Class: Lurker::RenderingController
- Inherits:
-
AbstractController::Base
- Object
- AbstractController::Base
- Lurker::RenderingController
- Includes:
- AbstractController::AssetPaths, AbstractController::Helpers, AbstractController::Layouts, AbstractController::Logger, AbstractController::Rendering, ActionView::Context, ActionView::Layouts, ActionView::Rendering
- Defined in:
- lib/lurker/rendering_controller.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#endpoint_presenter ⇒ Object
writeonly
Sets the attribute endpoint_presenter.
-
#service_presenter ⇒ Object
writeonly
Sets the attribute service_presenter.
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
- #title ⇒ Object
Instance Attribute Details
#endpoint_presenter=(value) ⇒ Object (writeonly)
Sets the attribute endpoint_presenter
19 20 21 |
# File 'lib/lurker/rendering_controller.rb', line 19 def endpoint_presenter=(value) @endpoint_presenter = value end |
#service_presenter=(value) ⇒ Object (writeonly)
Sets the attribute service_presenter
19 20 21 |
# File 'lib/lurker/rendering_controller.rb', line 19 def service_presenter=(value) @service_presenter = value end |
Instance Method Details
#cookies ⇒ Object
so that your cookies calls still work
63 64 65 |
# File 'lib/lurker/rendering_controller.rb', line 63 def {} end |
#flash ⇒ Object
so that your flash calls still work
48 49 50 |
# File 'lib/lurker/rendering_controller.rb', line 48 def flash {} end |
#params ⇒ Object
and params will be accessible
58 59 60 |
# File 'lib/lurker/rendering_controller.rb', line 58 def params {} end |
#protect_against_forgery? ⇒ Boolean
we are not in a browser, no need for this
43 44 45 |
# File 'lib/lurker/rendering_controller.rb', line 43 def protect_against_forgery? false end |
#request ⇒ Object
and nil request to differentiate between live and offline
53 54 55 |
# File 'lib/lurker/rendering_controller.rb', line 53 def request OpenStruct.new end |
#tag_with_anchor(tag, content, anchor_slug = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/lurker/rendering_controller.rb', line 31 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 |
#title ⇒ Object
27 28 29 |
# File 'lib/lurker/rendering_controller.rb', line 27 def title [@service_presenter.try(:title), @endpoint_presenter.try(:title)].compact.join ' | ' end |