class RenderSync::Renderer

Attributes

context[RW]

Public Class Methods

new() click to toggle source
# File lib/render_sync/renderer.rb, line 6
def initialize
  self.context = ApplicationController.new.view_context
  self.context.instance_eval do
    def url_options
      ActionMailer::Base.default_url_options
    end
  end
end

Public Instance Methods

render_to_string(options) click to toggle source
# File lib/render_sync/renderer.rb, line 15
def render_to_string(options)
  context.render(options)
end
url_options() click to toggle source
# File lib/render_sync/renderer.rb, line 9
def url_options
  ActionMailer::Base.default_url_options
end