Permalink
Browse files

Merge branch 'master' into rails3

Conflicts:
	CHANGELOG
	formtastic.gemspec
	spec/inputs/boolean_input_spec.rb
  • Loading branch information...
2 parents 6c3a884 + ce2b08a commit e5c42d0cffd4ebe877bb0d16e2f466e71f5e68d5 @mjonuschat mjonuschat committed Aug 1, 2010
Showing with 13 additions and 5 deletions.
  1. +6 −0 CHANGELOG
  2. +1 −1 VERSION.yml
  3. +2 −2 formtastic.gemspec
  4. +3 −1 lib/formtastic.rb
  5. +1 −1 spec/inputs/boolean_input_spec.rb
View
@@ -2,12 +2,18 @@
* Changed semantic_remote_form_for to allow for unobstrusive javascript / :remote option (rails3)
* Changed spec_helper to support Rails 2 with RSpec or Rails 3 with RSpec 2 environments
* Changed Rakefile to initalize the correct testing framework for the enviroment
+* Changed i18n dependency to >= 0.4
* Fixed use of model_name.human instead of model_name.human_name (rails3)
* Fixed use of deprecated Errors#on_base
+* Fixed use of ActionController::RecordIdentifier#singular_class_name (rails3)
* Added railtie to perform initialization tasks after the rails framework is available (rails3)
* Added compatible install and form helpers (rails3)
* Added support for ActiveModel Validations, thanks to Guillaume Belleguic (rails3)
+1.0.0.beta4
+
+* ensure i18n < 0.4 is listed as a dependency in the gemspec
+
1.0.0.beta3
* Added :ignore_date option to time inputs (#308)
View
@@ -2,4 +2,4 @@
:major: 1
:minor: 0
:patch: 0
-:build: beta3
+:build: rc
View
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = %q{formtastic}
- s.version = "1.0.0.beta3"
+ s.version = "1.0.0.rc"
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Justin French"]
- s.date = %q{2010-07-29}
+ s.date = %q{2010-08-01}
s.description = %q{A Rails form builder plugin/gem with semantically rich and accessible markup}
s.email = %q{justin@indent.com.au}
s.extra_rdoc_files = [
View
@@ -1259,9 +1259,11 @@ def boolean_input(method, options)
html_options = options.delete(:input_html) || {}
checked = options.key?(:checked) ? options[:checked] : options[:selected]
html_options[:checked] = checked == true if [:selected, :checked].any? { |k| options.key?(k) }
+ checked_value = options.delete(:checked_value) || '1'
+ unchecked_value = options.delete(:unchecked_value) || '0'
input = self.check_box(method, strip_formtastic_options(options).merge(html_options),
- options.delete(:checked_value) || '1', options.delete(:unchecked_value) || '0')
+ checked_value, unchecked_value)
options = options_for_label(options)
# the label() method will insert this nested input into the label at the last minute
@@ -41,7 +41,7 @@
end
output_buffer.concat(form) if Formtastic::Util.rails3?
- output_buffer.should have_tag('form li label input[@type="checkbox"][@value="checked"]')
+ output_buffer.should have_tag('form li label input[@type="checkbox"][@value="checked"]:not([@unchecked_value][@checked_value])')
output_buffer.should have_tag('form li label input[@type="hidden"][@value="unchecked"]')
end

0 comments on commit e5c42d0

Please sign in to comment.