module Erector::Rails::WidgetExtensions

Public Class Methods

included(base) click to toggle source
# File lib/erector/rails2/extensions/rails_widget.rb, line 107
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

__in_erb_template() click to toggle source

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
capture(&block) click to toggle source

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