Permalink
Browse files

Delete :true and :false from options to avoid them from being sent to…

… inputs tags.

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
josevalim authored and justinfrench committed Mar 6, 2009
1 parent 9dfb782 commit b0a61613b6b2fd06d52fdf696429c4b4eac6ec3b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/formtastic.rb
View
@@ -622,7 +622,7 @@ def boolean_select_input(method, options)
options[:true] ||= I18n.t('yes', :default => 'Yes', :scope => [:formtastic]).send(@@label_str_method)
options[:false] ||= I18n.t('no', :default => 'No', :scope => [:formtastic]).send(@@label_str_method)
- choices = [ [options[:true],true], [options[:false],false] ]
+ choices = [ [options.delete(:true),true], [options.delete(:false),false] ]
input_label(method, options) + template.select(@object_name, method, choices, set_options(options))
end

0 comments on commit b0a6161

Please sign in to comment.