class Lurker::RenderingController

Attributes

endpoint_presenter[W]
service_presenter[W]

Public Instance Methods

cookies() click to toggle source

so that your cookies calls still work

# File lib/lurker/rendering_controller.rb, line 63
def cookies
  {}
end
flash() click to toggle source

so that your flash calls still work

# File lib/lurker/rendering_controller.rb, line 48
def flash
  {}
end
params() click to toggle source

and params will be accessible

# File lib/lurker/rendering_controller.rb, line 58
def params
  {}
end
protect_against_forgery?() click to toggle source

we are not in a browser, no need for this

# File lib/lurker/rendering_controller.rb, line 43
def protect_against_forgery?
  false
end
request() click to toggle source

and nil request to differentiate between live and offline

# File lib/lurker/rendering_controller.rb, line 53
def request
  OpenStruct.new
end
tag_with_anchor(tag, content, anchor_slug = nil) click to toggle source
# 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() click to toggle source
# File lib/lurker/rendering_controller.rb, line 27
def title
  [@service_presenter.try(:title), @endpoint_presenter.try(:title)].compact.join ' | '
end