formtastic 1.2.0 → 1.2.1.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/init.rb +5 -0
- data/lib/formtastic.rb +3 -2
- data/rails/init.rb +2 -0
- metadata +8 -5
data/init.rb
ADDED
data/lib/formtastic.rb
CHANGED
@@ -1280,16 +1280,17 @@ module Formtastic #:nodoc:
|
|
1280
1280
|
input = template.check_box_tag(
|
1281
1281
|
"#{@object_name}[#{method}]",
|
1282
1282
|
checked_value,
|
1283
|
-
(@object && @object.send(:"#{method}")
|
1283
|
+
(@object && @object.send(:"#{method}")),
|
1284
1284
|
:id => field_id
|
1285
1285
|
)
|
1286
|
+
|
1286
1287
|
options = options_for_label(options)
|
1287
1288
|
options[:for] ||= field_id
|
1288
1289
|
|
1289
1290
|
# the label() method will insert this nested input into the label at the last minute
|
1290
1291
|
options[:label_prefix_for_nested_input] = input
|
1291
1292
|
|
1292
|
-
template.hidden_field_tag(method, unchecked_value) << self.label(method, options)
|
1293
|
+
template.hidden_field_tag("#{@object_name}[#{method}]", unchecked_value, :id => nil) << self.label(method, options)
|
1293
1294
|
end
|
1294
1295
|
|
1295
1296
|
# Generates an input for the given method using the type supplied with :as.
|
data/rails/init.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formtastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 31098181
|
5
|
+
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
|
9
|
+
- 1
|
10
|
+
- beta
|
11
|
+
version: 1.2.1.beta
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Justin French
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-11-16 00:00:00 +11:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -155,8 +156,10 @@ files:
|
|
155
156
|
- lib/generators/templates/formtastic.rb
|
156
157
|
- lib/generators/templates/formtastic_changes.css
|
157
158
|
- lib/locale/en.yml
|
159
|
+
- rails/init.rb
|
158
160
|
- MIT-LICENSE
|
159
161
|
- README.textile
|
162
|
+
- init.rb
|
160
163
|
has_rdoc: true
|
161
164
|
homepage: http://github.com/justinfrench/formtastic/tree/master
|
162
165
|
licenses: []
|