Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
SessionsHelper
Defined in:
app/controllers/application_controller.rb

Instance Attribute Summary collapse

Method Summary

Methods included from SessionsHelper

#sessions_current_user, #sessions_current_user=, #sessions_sign_in, #sessions_sign_out, #sessions_signed_in?

Instance Attribute Details

#meta_dataObject



20
21
22
23
24
25
# File 'app/controllers/application_controller.rb', line 20

def 
  @meta_data ||= {
    description: @meta_description,
    keywords: @meta_keywords
  }.delete_if{ |k, v| v.nil? }
end

#meta_descriptionObject

Returns the value of attribute meta_description



11
12
13
# File 'app/controllers/application_controller.rb', line 11

def meta_description
  @meta_description
end

#meta_keywordsObject

Returns the value of attribute meta_keywords



11
12
13
# File 'app/controllers/application_controller.rb', line 11

def meta_keywords
  @meta_keywords
end

#meta_titleObject



15
16
17
18
# File 'app/controllers/application_controller.rb', line 15

def meta_title
  @meta_title ||= [@meta_title.presence || @page_title.presence, site_name].
                  compact.join(' | ')
end

#page_titleObject

Returns the value of attribute page_title



11
12
13
# File 'app/controllers/application_controller.rb', line 11

def page_title
  @page_title
end

#site_nameObject



27
28
29
# File 'app/controllers/application_controller.rb', line 27

def site_name
  @site_name ||= 'TaxonWorks'
end