Class: Katapult::Action

Inherits:
Element show all
Defined in:
lib/katapult/action.rb

Constant Summary

Constants inherited from Element

Element::UnknownFormattingError, Element::UnknownOptionError

Instance Attribute Summary

Attributes inherited from Element

#application_model, #name, #options

Instance Method Summary collapse

Methods inherited from Element

#set_application_model

Constructor Details

#initialize(*args) ⇒ Action

Returns a new instance of Action.



12
13
14
15
16
17
# File 'lib/katapult/action.rb', line 12

def initialize(*args)
  super

  self.scope ||= (name == 'index') ? :collection : :member
  set_method
end