lib/mbrao/integrations/rails.rb in mbrao-1.0.1 vs lib/mbrao/integrations/rails.rb in mbrao-1.0.2
- old
+ new
@@ -24,10 +24,10 @@
# @return [String] The rendered template.
def render(renderer, template)
content = ::Mbrao::Parser.parse(template)
renderer.controller.instance_variable_set(:@mbrao_content, content)
renderer.controller.define_singleton_method(:mbrao_content) { @mbrao_content }
- renderer.controller.send(:helper_method, :mbrao_content)
+ renderer.controller.class.send(:helper_method, :mbrao_content)
::Mbrao::Parser.render(content, {engine: content.metadata[:engine], locale: renderer.controller.params[:locale]})
end
# Declares support for streaming.
\ No newline at end of file