Skip to content

Commit

Permalink
remove Rails 3 :parent_builder work-around
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfrench committed Nov 7, 2014
1 parent d2b28a5 commit 3363fd7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/formtastic/form_builder.rb
Expand Up @@ -79,12 +79,7 @@ def self.configure(name, value = nil)
#
# @todo is there a way to test the params structure of the Rails helper we wrap to ensure forward compatibility?
def semantic_fields_for(record_or_name_or_array, *args, &block)
# Add a :parent_builder to the args so that nested translations can be possible in Rails 3
options = args.extract_options!
options[:parent_builder] ||= self

# Wrap the Rails helper
fields_for(record_or_name_or_array, *(args << options), &block)
fields_for(record_or_name_or_array, *args, &block)
end

def initialize(object_name, object, template, options)
Expand Down

0 comments on commit 3363fd7

Please sign in to comment.