Class: Lurker::RenderingController
- Inherits:
-
AbstractController::Base
- Object
- AbstractController::Base
- Lurker::RenderingController
- Includes:
- AbstractController::Helpers, AbstractController::Layouts, AbstractController::Rendering, ActionView::Context, ActionView::Layouts, ActionView::Rendering
- Defined in:
- lib/lurker/rendering_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#cookies ⇒ Object
so that your cookies calls still work.
-
#flash ⇒ Object
so that your flash calls still work.
-
#params ⇒ Object
and params will be accessible.
-
#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.
- #tag_with_anchor(tag, content, anchor_slug = nil) ⇒ Object
Instance Method Details
#cookies ⇒ Object
so that your cookies calls still work
56 57 58 |
# File 'lib/lurker/rendering_controller.rb', line 56 def {} end |
#flash ⇒ Object
so that your flash calls still work
41 42 43 |
# File 'lib/lurker/rendering_controller.rb', line 41 def flash {} end |
#params ⇒ Object
and params will be accessible
51 52 53 |
# File 'lib/lurker/rendering_controller.rb', line 51 def params {} end |
#protect_against_forgery? ⇒ Boolean
we are not in a browser, no need for this
25 26 27 |
# File 'lib/lurker/rendering_controller.rb', line 25 def protect_against_forgery? false end |
#request ⇒ Object
and nil request to differentiate between live and offline
46 47 48 |
# File 'lib/lurker/rendering_controller.rb', line 46 def request OpenStruct.new end |
#tag_with_anchor(tag, content, anchor_slug = nil) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lurker/rendering_controller.rb', line 29 def tag_with_anchor(tag, content, anchor_slug = nil) anchor_slug ||= content.downcase.gsub(' ', '_') <<-EOS <#{tag} id="#{anchor_slug}"> <a href="##{anchor_slug}" class="anchor"> #{content} </a> </#{tag}> EOS end |