Fix for #9360 content_for regression #9366

Merged
merged 1 commit into from Feb 28, 2013

Projects

None yet

5 participants

@killthekitten

More info in #9360 bug report.

  • Change @content hash default style
  • Provide test
@carlosantoniodasilva carlosantoniodasilva and 1 other commented on an outdated diff Feb 22, 2013
actionpack/lib/action_view/helpers/capture_helper.rb
@@ -156,7 +156,8 @@ def content_for(name, content = nil, options = {}, &block)
end
nil
else
- @view_flow.get(name)
+ content = @view_flow.get(name)
+ content.blank? ? nil : content
@carlosantoniodasilva
carlosantoniodasilva Feb 22, 2013 Ruby on Rails member

@view_flow.get(name).presence should do?

@killthekitten
killthekitten Feb 22, 2013

That's what I've been looking for 👍

@carlosantoniodasilva

You'll also need to provide a changelog entry for that. Thanks.

@killthekitten

Should I squash/force commits into one? Thanks. /cc @carlosantoniodasilva

@schneems
Member

@killthekitten, yes please squash into one commit

@jalada
jalada commented Feb 28, 2013

👍 this looks good!

@rafaelfranca rafaelfranca merged commit fae2e4d into rails:master Feb 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment