# File lib/erector/rails2/extensions/rails_widget.rb, line 107 def self.included(base) base.extend(ClassMethods) end
This is here to force parent.capture to return the output
# File lib/erector/rails2/extensions/rails_widget.rb, line 123 def __in_erb_template; end
We need to delegate capture to parent.capture, so that when the captured block is executed, both erector and Rails output from within the block go to the appropriate buffer.
# File lib/erector/rails2/extensions/rails_widget.rb, line 114 def capture(&block) if parent.respond_to?(:capture) raw(parent.capture(&block).to_s) else super end end