Skip to content

Instantly share code, notes, and snippets.

@dysk
Created February 24, 2014 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dysk/d84baf7567201fb67125 to your computer and use it in GitHub Desktop.
Save dysk/d84baf7567201fb67125 to your computer and use it in GitHub Desktop.
class PdfRenderer < AbstractController::Base
include ActionController::Helpers
include ActionController::Rendering
include ActionController::Renderers::All
class << self
def controller_path
""
end
end
include AbstractController::Layouts
def response_body=(body)
body = [body] unless body.nil? || body.respond_to?(:each)
super
end
append_view_path "app/views"
helper :application, :pdf, :events, :orders
include PdfHelper
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment