Class: ApplicationController

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from LoginSystem

included

Constructor Details

#initializeApplicationController

Returns a new instance of ApplicationController.



23
24
25
26
# File 'app/controllers/application_controller.rb', line 23

def initialize
  super
  @trusty_config = TrustyCms::Config
end

Instance Attribute Details

#cacheObject

Returns the value of attribute cache.



19
20
21
# File 'app/controllers/application_controller.rb', line 19

def cache
  @cache
end

#pagination_parametersObject (readonly)

Returns the value of attribute pagination_parameters.



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

def pagination_parameters
  @pagination_parameters
end

#trusty_configObject

Returns the value of attribute trusty_config.



19
20
21
# File 'app/controllers/application_controller.rb', line 19

def trusty_config
  @trusty_config
end

Instance Method Details

#template_nameObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'app/controllers/application_controller.rb', line 28

def template_name
  case self.action_name
  when 'index'
    'index'
  when 'new','create'
    'new'
  when 'show'
    'show'
  when 'edit', 'update'
    'edit'
  when 'remove', 'destroy'
    'remove'
  else
    self.action_name
  end
end