Sha256: c6a6e62e27907f0ac91c39407f807a1428de45b61b559829786be0bc3492066e
Contents?: true
Size: 698 Bytes
Versions: 2
Compression:
Stored size: 698 Bytes
Contents
require 'abstract_controller' require 'action_view' require 'render_anywhere/version' require 'render_anywhere/rendering_controller' module RenderAnywhere def render(*args) rendering_controller.render_to_string(*args) end def set_render_anywhere_helpers(*args) args.each do |helper_name| rendering_controller.class_eval do helper helper_name.to_s.constantize end end end def set_instance_variable(var, value) rendering_controller.class_eval do attr_accessor :"#{var}" end rendering_controller.public_send("#{var}=", value) end def rendering_controller @rendering_controller ||= RenderAnywhere::RenderingController.new end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
render_anywhere-0.0.9 | lib/render_anywhere.rb |
render_anywhere-0.0.8 | lib/render_anywhere.rb |