Class: RenderAnywhere::RenderingController
- Inherits:
-
AbstractController::Base
- Object
- AbstractController::Base
- RenderAnywhere::RenderingController
- Includes:
- AbstractController::AssetPaths, AbstractController::Helpers, AbstractController::Layouts, AbstractController::Logger, AbstractController::Rendering, AbstractController::Translation
- Defined in:
- lib/render_anywhere/rendering_controller.rb
Instance Method Summary collapse
-
#flash ⇒ Object
so that your flash calls still work.
-
#initialize(*args) ⇒ RenderingController
constructor
configure the different paths correctly.
-
#protect_against_forgery? ⇒ Boolean
we are not in a browser, no need for this.
-
#request ⇒ Object
and nil request to differentiate between live and offline.
Constructor Details
#initialize(*args) ⇒ RenderingController
configure the different paths correctly
22 23 24 25 26 27 28 |
# File 'lib/render_anywhere/rendering_controller.rb', line 22 def initialize(*args) super() lookup_context.view_paths = Rails.root.join('app', 'views') config.javascripts_dir = Rails.root.join('public', 'javascripts') config.stylesheets_dir = Rails.root.join('public', 'stylesheets') config.assets_dir = Rails.root.join('public') end |
Instance Method Details
#flash ⇒ Object
so that your flash calls still work
36 37 38 |
# File 'lib/render_anywhere/rendering_controller.rb', line 36 def flash {} end |
#protect_against_forgery? ⇒ Boolean
we are not in a browser, no need for this
31 32 33 |
# File 'lib/render_anywhere/rendering_controller.rb', line 31 def protect_against_forgery? false end |
#request ⇒ Object
and nil request to differentiate between live and offline
44 45 46 |
# File 'lib/render_anywhere/rendering_controller.rb', line 44 def request nil end |