Module: Adva::Controller::AbstractActions::ActMacro

Included in:
Adva::Controller::AbstractActions
Defined in:
lib/adva/controller/abstract_actions.rb

Instance Method Summary collapse

Instance Method Details

#abstract_actions(options = {}) ⇒ Object


12
13
14
15
16
17
18
19
20
21
22
# File 'lib/adva/controller/abstract_actions.rb', line 12

def abstract_actions(options = {})
  unless abstract_actions?
    include InternalRedirect
    include InstanceMethods

    class_inheritable_accessor :abstract_action_options
    self.abstract_action_options = options.reverse_merge(:except => [])

    before_filter :internal_redirect
  end
end

#abstract_actions?Boolean

Returns:

  • (Boolean)

24
25
26
# File 'lib/adva/controller/abstract_actions.rb', line 24

def abstract_actions?
  included_modules.include?(InstanceMethods)
end