Skip to content

Commit

Permalink
only need to support Rails 4 now
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfrench committed Nov 7, 2014
1 parent 7583aa5 commit d7535e6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/formtastic/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,8 @@ def semantic_fields_for(record_or_name_or_array, *args, &block)
fields_for(record_or_name_or_array, *(args << options), &block)
end

def initialize(object_name, object, template, options, block=nil)
# rails 3 supported passing in the block parameter to FormBuilder
# rails 4.0 deprecated the block parameter and does nothing with it
# rails 4.1 removes the parameter completely
if Util.rails3? || Util.rails4_0?
super
else # Must be rails4_1 or greater
super object_name, object, template, options
end
def initialize(object_name, object, template, options)
super

if respond_to?('multipart=') && options.is_a?(Hash) && options[:html]
self.multipart = options[:html][:multipart]
Expand Down

0 comments on commit d7535e6

Please sign in to comment.