aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures/layouts/block_with_layout.erb
Commit message (Collapse)AuthorAgeFilesLines
* Add deprecation notices for <% %>.Carlhuda2010-03-151-2/+2
| | | | | | | | | | | | | | | | * The approach is to compile <% %> into a method call that checks whether the value returned from a block is a String. If it is, it concats to the buffer and prints a deprecation warning. * <%= %> uses exactly the same logic to compile the template, which first checks to see whether it's compiling a block. * This should have no impact on other uses of block in templates. For instance, in <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array, not a String, so the result is not concatenated * In two cases (#capture and #cache), a String can be returned that should *never* be concatenated. We have temporarily created a String subclass called NonConcattingString which behaves (and is serialized) identically to String, but is not concatenated by the code that handles deprecated <% %> block helpers. Once we remove support for <% %> block helpers, we can remove NonConcattingString.
* When rendering layouts with blocks, use #capture to avoid assuming that the ↵Nathan Weizenbaum2009-11-051-1/+1
| | | | | | return value is the block's content. Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Fixed rendering of partials with layout when done from site layout (closes ↵David Heinemeier Hansson2008-01-031-0/+3
#9209) [antramm] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de