Skip to content

Commit

Permalink
fix rails generator
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Nov 21, 2010
1 parent e8a029d commit b233714
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/temple/generators.rb
Expand Up @@ -174,7 +174,8 @@ def on_dynamic(code)
# _buf
class RailsOutputBuffer < StringBuffer
set_default_options :buffer_class => 'ActionView::OutputBuffer',
:buffer => '@output_buffer'
:buffer => '@output_buffer',
:capture_generator => RailsOutputBuffer

def preamble
"#{buffer} = #{options[:buffer_class]}.new"
Expand All @@ -183,10 +184,6 @@ def preamble
def concat(str)
"#{buffer}.safe_concat((#{str}))"
end

def on_capture(name, block)
["#{name} = #{buffer}", compile!(block), name].join(' ; ')
end
end
end

Expand Down

0 comments on commit b233714

Please sign in to comment.