Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 7b1d7d38545eb61b1ef5312f917079bf45c60661 1 parent bd1a9d1
José Valim josevalim authored justinfrench committed

Showing 1 changed file with 4 additions and 6 deletions. Show diff stats Hide diff stats

  1. +4 6 lib/formtastic.rb
10 lib/formtastic.rb
@@ -325,10 +325,8 @@ def inputs_for_nested_attributes(fields_for_object, inputs, options, &block)
325 325 # Ensure :object => @object is set before sending the options down to the Rails layer.
326 326 # Also remove any Formtastic-specific options
327 327 def set_options(options)
328   - opts = options.except(:value_method, :label_method, :collection, :required,
329   - :label, :as, :hint, :input_html, :label_html, :value_as_class)
330   -
331   - opts.merge!(:object => @object)
  328 + options.except(:value_method, :label_method, :collection, :required, :label,
  329 + :as, :hint, :input_html, :label_html, :value_as_class)
332 330 end
333 331
334 332 def save_or_create_commit_button_text #:nodoc:
@@ -841,9 +839,9 @@ def default_string_options(method) #:nodoc:
841 839 column = @object.column_for_attribute(method) if @object.respond_to?(:column_for_attribute)
842 840
843 841 if column.nil? || column.limit.nil?
844   - { :size => @@default_text_field_size, :object => @object }
  842 + { :size => @@default_text_field_size }
845 843 else
846   - { :maxlength => column.limit, :size => [column.limit, @@default_text_field_size].min, :object => @object }
  844 + { :maxlength => column.limit, :size => [column.limit, @@default_text_field_size].min }
847 845 end
848 846 end
849 847

0 comments on commit 7b1d7d3

Please sign in to comment.
Something went wrong with that request. Please try again.