mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Improve AP changelog entry about layout method with nil return
Add a note about getting the "no layout" behavior by returning "false" to make it easier for people that might need to change their code. Related to #8458. [ci skip]
This commit is contained in:
parent
2d1eebfd88
commit
6ee17918e1
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
## Rails 4.0.0 (unreleased) ##
|
||||
|
||||
* Ensure consistent fallback to the default layout lookup for layouts set
|
||||
using symbols or procs that return nil.
|
||||
using symbols or procs that return `nil`.
|
||||
|
||||
All of the following layouts will result in the default layout lookup:
|
||||
|
||||
|
@ -10,13 +10,13 @@
|
|||
layout proc { nil }
|
||||
|
||||
layout :returns_nil
|
||||
|
||||
def returns_nil
|
||||
nil
|
||||
end
|
||||
|
||||
Previously symbols and procs which returned nil resulted in no layout which
|
||||
differed from the `layout nil` behavior.
|
||||
Previously symbols and procs which returned `nil` resulted in no layout which
|
||||
differed from the `layout nil` behavior. To get the "no layout" behavior just
|
||||
return `false` instead of `nil` for `layout`.
|
||||
|
||||
*Chris Nicola*
|
||||
|
||||
|
|
Loading…
Reference in a new issue