Module: AccountEngine::Controller

Includes:
Support
Defined in:
lib/account_engine/controller.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Support

#current_user, #user?

Class Method Details

.included(base) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/account_engine/controller.rb', line 25

def self.included(base)
  base.extend(ClassMethods)

  base.class_eval do        
    # We don't want these actions to be exposed to the Permission
    # system synchronisation, so we hide them for all controllers.
    hide_action :require_without_load_path_reloading, :process_test
    hide_action :action_method_names, :wsdl, :deepcopy
    hide_action :readable?, :writable?, :r?, :w?, :authorize_action
    hide_action :store_location, :redirect_back_or_default

    # methods from the AccountEngine module itself
    hide_action :link_if_authorized, :authorized?, :user_name_if_logged_in
    hide_action :user?, :current_user, :logged_in?
  end
end

Instance Method Details

#action_method_namesObject

Returns an array of all action names for this controller (Actually returns the result of ApplicationController#action_methods, which is private)



21
22
23
# File 'lib/account_engine/controller.rb', line 21

def action_method_names
  action_methods
end