Module: SwissKnife::ActionController

Defined in:
lib/swiss_knife/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#page_title(*args) ⇒ Object

Page title.

page_title
page_title "Some title"
page_title :name => "Some product"

Locale:

en:
  titles:
    products:
      show: "Product: %{name}"
      index: "All products"


17
18
19
20
21
22
23
24
# File 'lib/swiss_knife/action_controller.rb', line 17

def page_title(*args)
  if args.empty?
    page_title_get
  else
    options = args.extract_options!
    page_title_set args.first, options
  end
end

#page_title_optionsObject

Store page title options that are used on I18n interpolation.



29
30
31
# File 'lib/swiss_knife/action_controller.rb', line 29

def page_title_options
  @page_title_options ||= {}
end