-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Form builder patch #1760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form builder patch #1760
Conversation
Just waiting for Travis. |
Scumbag Travis. I'm pretty sure my test passes, it shouldn't break anything as well. I'll check it again. |
Ugh. It breaks a few tests :-(. I'll fix it soon. |
Grr. That's madness - jiggling form_buffers around the class... My mind is going to explode soon. Why is it so complex señor? |
super | ||
# Ensure the buffer is returned instead of the block result itself | ||
form_buffers.last | ||
end | ||
form_buffers.last << content.html_safe | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rewrite it like this:
def inputs(*args, &block)
@inputs_with_block = !!block_given? # Record whether a block is passed
form_buffers.last << with_new_form_buffer{ super; form_buffers.last }.html_safe
end
@qoobaa why did you close this pull request? |
I wasn't able to fix the tests :-(. |
I crafted a working solution: #1996 :] |
No description provided.