mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Haml] Fix #capture under Rails 3.
Closes gh-174
This commit is contained in:
parent
0da36ad799
commit
9ae8b31920
2 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,11 @@
|
|||
* Table of contents
|
||||
{:toc}
|
||||
|
||||
## 3.0.5 (Unreleased)
|
||||
|
||||
* Make sure the `#capture` helper in Rails 3
|
||||
doesn't print its value directly to the template.
|
||||
|
||||
## 3.0.4
|
||||
|
||||
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.4).
|
||||
|
|
|
@ -85,7 +85,9 @@ module ActionView
|
|||
module CaptureHelper
|
||||
def capture_with_haml(*args, &block)
|
||||
if Haml::Helpers.block_is_haml?(block)
|
||||
capture_haml(*args, &block)
|
||||
str = capture_haml(*args, &block)
|
||||
return ActionView::NonConcattingString.new(str) if defined?(ActionView::NonConcattingString)
|
||||
return str
|
||||
else
|
||||
capture_without_haml(*args, &block)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue