dynaspan 0.1.2.beta1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -3
  3. data/lib/dynaspan/version.rb +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd231d2af63a1f712b0d8d1f69bc3039b1cdda40
4
- data.tar.gz: e444a9c8374f08f0a61eeb927c83daf6138ca4c7
3
+ metadata.gz: 7d4b55cf6c429bb1ac873e0a70acd51a16645c83
4
+ data.tar.gz: 13e3925cdca42feca1289d938f571d6b9075a5ae
5
5
  SHA512:
6
- metadata.gz: 5e187c11964538324ffb48e1abce8a45ac140dfb05c6a2e9fab3924dcb784047979b97957052052a633a0133b4543b50a38e781f1d5414118c2363a7dcee6252
7
- data.tar.gz: ca711610f0de1fb36aeeb3fc845bdcef796ca73a6677c1032d7fda89222327419ddb899c28b172a2398cdebaed54c460286da45aca80a05343cde1b0bd07c745
6
+ metadata.gz: ef2603ad09170b034138d392edc6a66cb2c3af26be3de24a7a44768c8595871928c82d55c5730160bd6df5eb35fe234448509d48a38729e3f05f95ad369a442f
7
+ data.tar.gz: f7b67edadbd7efac14e3e75a498424ed36a5a9bba8bbab52be30ee41266647eda7aa535f5b4ef760886a47ea0cea41515278341e02936d7f2ce6b8fee8a43897
data/README.md CHANGED
@@ -66,7 +66,7 @@ For example **dynaspan_text_field(author, author.stories, :title)**. This works
66
66
  The last two parameters can be edit text, and then additional options (in that order). Both are optional. The edit text
67
67
  is a way to be able to click somewhere to open up the input to initially enter text.
68
68
 
69
- The options Hash currently has three options.
69
+ The options Hash currently has these options.
70
70
 
71
71
  - **:hidden_fields** will put in as many hidden fields as you include in a Hash with key->value matching to name->value
72
72
  - **:callback_on_update** is a no frills callback. It runs whatever command you give it whenever Dynaspan submits an update
@@ -75,11 +75,19 @@ The options Hash currently has three options.
75
75
  as you'd like. It will dynamically append a last parameter which is a Hash of two values. The first is the CSS selector id
76
76
  of the Dynaspan block that just performed the action, the second value is the actual text that was entered. The keys in this
77
77
  Hash are **ds_selector** and **ds_input**
78
-
78
+ - **:unique_id** allows custom ID labelling which is ideal for JavaScript generated usage.
79
+ - **:form_for** allows adding or over-writing any form_for parameter (besides the object being written to). This takes a Hash
80
+ of parameters just like you would give in a view for your form_for form. If you have a namespaced object to update use
81
+ the **url:** option in the hash for the path to use in updating your object.
79
82
 
80
83
  ###How it updates
81
84
 
82
- The AJAX call will call the update method on your first Object parameter via PATCH. The optional nested attribute and the symbol for the field are all part of the main Object being updated. There is no expected AJAX reply. It's a silent set it and forget it method. If you don't have your update method configured with a `.js` response then it will successfully perform the update on the object, and then send a complaint about a response but no one will notice (unless maybe you look at the server logs). In other words the client experience is only good, and the server won't hiccup over it.
85
+ The AJAX call will call the update method on your first Object parameter via PATCH. The optional nested attribute
86
+ and the symbol for the field are all part of the main Object being updated. There is no expected AJAX reply. It's
87
+ a silent set it and forget it method. If you don't have your update method configured with a `.js` response then it
88
+ will successfully perform the update on the object, and then send a complaint about a response but no one will notice
89
+ (unless maybe you look at the server logs). In other words the client experience is only good, and the server
90
+ won't hiccup over it.
83
91
 
84
92
  ###It's too easy!
85
93
 
@@ -112,6 +120,13 @@ calling parents with selectors. Example usage:
112
120
 
113
121
  ###What's New
114
122
 
123
+ ####Version 0.1.2
124
+
125
+ Added **unique_id** parameter to the options Hash allowing custom ID labelling which is ideal for JavaScript generated usage.
126
+
127
+ Added **form_for** parameter to allow adding or over-writing any form_for parameter (besides the object being written to).
128
+ If you have a namespaced object to update use the **url:** option in the hash for the path to use in updating your object.
129
+
115
130
  ####Version 0.1.1
116
131
 
117
132
  Added a JavaScript callback that will **append** a Hash/Dictionary of the updated Dynaspan Object to the end of your
@@ -1,3 +1,3 @@
1
1
  module Dynaspan
2
- VERSION = '0.1.2.beta1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynaspan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.beta1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-05-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: In place text editing with AJAX substituting text to input field.
14
14
  email:
@@ -48,9 +48,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  version: '2.0'
49
49
  required_rubygems_version: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 1.3.1
53
+ version: '0'
54
54
  requirements:
55
55
  - jQuery
56
56
  - Rails