Skip to content
Browse files

Make inputs_for_nested_attributes return strings

  • Loading branch information...
1 parent f7ec01e commit 2fa8cb81041f63ea036ccf66821bce571ab36bc0 @yabawock yabawock committed
Showing with 4 additions and 3 deletions.
  1. +2 −1 CHANGELOG
  2. +2 −2 lib/formtastic.rb
View
3 CHANGELOG
@@ -1,5 +1,6 @@
(HEAD)
-* Added railtie to perform initialization tasks after the rails framework is available (rails3)
+* Added railtie to perform initialization tasks after the rails git framework is available (rails3)
+* Fixed inputs_for_nested_attributes only appending to the output buffer
0.9.8
View
4 lib/formtastic.rb
@@ -505,9 +505,9 @@ def inputs_for_nested_attributes(*args, &block) #:nodoc:
raise ArgumentError, 'You gave :for option with a block to inputs method, ' <<
'but the block does not accept any argument.' if block.arity <= 0
- proc { |f| f.inputs(*args){ block.call(f) } }
+ proc { |f| return f.inputs(*args){ block.call(f) } }
else
- proc { |f| f.inputs(*args) }
+ proc { |f| return f.inputs(*args) }
end
fields_for_args = [options.delete(:for), options.delete(:for_options) || {}].flatten

0 comments on commit 2fa8cb8

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