Permalink
Browse files

Stop objectifying options, since we are relying on FormBuilder that a…

…lready do that for us.

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
1 parent bd1a9d1 commit 7b1d7d38545eb61b1ef5312f917079bf45c60661 @josevalim josevalim committed with justinfrench Mar 17, 2009
Showing with 4 additions and 6 deletions.
  1. +4 −6 lib/formtastic.rb
View
10 lib/formtastic.rb
@@ -325,10 +325,8 @@ def inputs_for_nested_attributes(fields_for_object, inputs, options, &block)
# Ensure :object => @object is set before sending the options down to the Rails layer.
# Also remove any Formtastic-specific options
def set_options(options)
- opts = options.except(:value_method, :label_method, :collection, :required,
- :label, :as, :hint, :input_html, :label_html, :value_as_class)
-
- opts.merge!(:object => @object)
+ options.except(:value_method, :label_method, :collection, :required, :label,
+ :as, :hint, :input_html, :label_html, :value_as_class)
end
def save_or_create_commit_button_text #:nodoc:
@@ -841,9 +839,9 @@ def default_string_options(method) #:nodoc:
column = @object.column_for_attribute(method) if @object.respond_to?(:column_for_attribute)
if column.nil? || column.limit.nil?
- { :size => @@default_text_field_size, :object => @object }
+ { :size => @@default_text_field_size }
else
- { :maxlength => column.limit, :size => [column.limit, @@default_text_field_size].min, :object => @object }
+ { :maxlength => column.limit, :size => [column.limit, @@default_text_field_size].min }
end
end

0 comments on commit 7b1d7d3

Please sign in to comment.