Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix build error from #798 #800

Merged
merged 1 commit into from

2 participants

@mhuggins

This should fix the build error from my last pull request!

@justinfrench justinfrench merged commit eecfebb into justinfrench:master
@justinfrench

Thanks, all green :)
http://travis-ci.org/#!/justinfrench/formtastic/builds/679584

2.1.0.rc going out in the next 24hrs I hope!

@mhuggins

Awesome, thanks for your help! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2012
  1. @mhuggins
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/formtastic/helpers/inputs_helper.rb
View
8 lib/formtastic/helpers/inputs_helper.rb
@@ -371,8 +371,12 @@ def inputs_for_nested_attributes(*args, &block) #:nodoc:
'but the block does not accept any argument.' if block.arity <= 0
lambda do |f|
contents = f.inputs(*args) do
- index = parent_child_index(options[:parent]) if options[:parent]
- block.call(f, index)
+ if block.arity == 1 # for backwards compatibility with REE & Ruby 1.8.x
+ block.call(f)
+ else
+ index = parent_child_index(options[:parent]) if options[:parent]
+ block.call(f, index)
+ end
end
template.concat(contents)
end
Something went wrong with that request. Please try again.