59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/fortitude/erector.rb', line 59
def widget_uniwith_fortitude(original_method, target, assigns = {}, options = {}, &block)
if (target.kind_of?(::Class) && target < ::Fortitude::Widget)
target = target.new(assigns)
end
if target.kind_of?(::Fortitude::Widget)
rendering_context = ::Fortitude::RenderingContext.new(
:delegate_object => parent,
:output_buffer_holder => ::Fortitude::Erector::ErectorOutputBufferHolder.new(output),
:helpers_object => helpers)
return target.render_to(rendering_context, &block)
else
return original_method.call(target, assigns, options, &block)
end
end
|