public
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Override ActionView's #capture helper, so that it can be safely used 
within a helper.
nex3 (author)
Sat Mar 15 14:14:12 -0700 2008
commit  b8614eae6fb2f3df9fd74acc24b9bc8c9a441d06
tree    7ffbeb6770ac8ef67044f1e4e9b36d15a84c37d0
parent  7ceb247db99651b99b561c4153dfd3d1313e2ef3
...
17
18
19
 
 
 
 
 
 
 
 
 
 
20
21
22
...
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -17,6 +17,16 @@ if defined?(ActionView) and not defined?(Merb::Plugins)
0
     module Helpers
0
       # :stopdoc:
0
       module CaptureHelper
0
+ def capture_with_haml(*args, &block)
0
+ if is_haml?
0
+ capture_haml(*args, &block)
0
+ else
0
+ capture_without_haml(*args, &block)
0
+ end
0
+ end
0
+ alias_method :capture_without_haml, :capture
0
+ alias_method :capture, :capture_with_haml
0
+
0
         def capture_erb_with_buffer_with_haml(*args, &block)
0
           if is_haml?
0
             capture_haml_with_buffer(*args, &block)

Comments

    No one has commented yet.