formtastic 1.2.1.beta → 1.2.1.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/formtastic.rb +6 -7
  2. metadata +5 -5
data/lib/formtastic.rb CHANGED
@@ -342,7 +342,7 @@ module Formtastic #:nodoc:
342
342
  options = args.extract_options!
343
343
  ::ActiveSupport::Deprecation.warn(":class => 'whatever' is deprecated on commit button, use :wrapper_html => { :class => 'whatever' } instead.", caller) if options.key?(:class)
344
344
  text = options.delete(:label) || args.shift
345
-
345
+
346
346
 
347
347
  if @object && (@object.respond_to?(:persisted?) || @object.respond_to?(:new_record?))
348
348
  if @object.respond_to?(:persisted?) # ActiveModel
@@ -1274,13 +1274,11 @@ module Formtastic #:nodoc:
1274
1274
  checked_value = options.delete(:checked_value) || '1'
1275
1275
  unchecked_value = options.delete(:unchecked_value) || '0'
1276
1276
 
1277
- #input = self.check_box(method, strip_formtastic_options(options).merge(html_options),
1278
- # checked_value, unchecked_value)
1279
- field_id = [@@custom_namespace,@object_name,method].reject{|x|x.blank?}.join("_")
1277
+ field_id = generate_html_id(method, "")
1280
1278
  input = template.check_box_tag(
1281
- "#{@object_name}[#{method}]",
1282
- checked_value,
1283
- (@object && @object.send(:"#{method}")),
1279
+ "#{@object_name}[#{method}]",
1280
+ checked_value,
1281
+ (@object && @object.send(:"#{method}")),
1284
1282
  :id => field_id
1285
1283
  )
1286
1284
 
@@ -1966,3 +1964,4 @@ module Formtastic #:nodoc:
1966
1964
 
1967
1965
  end
1968
1966
  end
1967
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formtastic
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31098181
4
+ hash: -1848230065
5
5
  prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
9
  - 1
10
- - beta
11
- version: 1.2.1.beta
10
+ - beta3
11
+ version: 1.2.1.beta3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Justin French
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-16 00:00:00 +11:00
19
+ date: 2010-11-18 00:00:00 +11:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -164,7 +164,7 @@ has_rdoc: true
164
164
  homepage: http://github.com/justinfrench/formtastic/tree/master
165
165
  licenses: []
166
166
 
167
- post_install_message: "\n ========================================================================\n Thanks for installing Formtastic!\n ------------------------------------------------------------------------\n You can now (optionally) run the generator to copy some stylesheets and\n a config initializer into your application:\n rails generator formastic:install # Rails 3\n ./script/generate formtastic # Rails 2\n\n To generate some semantic form markup for your existing models, just run:\n rails generate formtastic:form MODEL_NAME # Rails 3\n ./script/generate form MODEL_NAME # Rails 2\n\n Find out more and get involved:\n http://github.com/justinfrench/formtastic\n http://groups.google.com.au/group/formtastic\n ========================================================================\n "
167
+ post_install_message: "\n ========================================================================\n Thanks for installing Formtastic!\n ------------------------------------------------------------------------\n You can now (optionally) run the generator to copy some stylesheets and\n a config initializer into your application:\n rails generate formtastic:install # Rails 3\n ./script/generate formtastic # Rails 2\n\n To generate some semantic form markup for your existing models, just run:\n rails generate formtastic:form MODEL_NAME # Rails 3\n ./script/generate form MODEL_NAME # Rails 2\n\n Find out more and get involved:\n http://github.com/justinfrench/formtastic\n http://groups.google.com.au/group/formtastic\n ========================================================================\n "
168
168
  rdoc_options:
169
169
  - --charset=UTF-8
170
170
  require_paths: