Module: Swamp::Controller::ClassMethods

Defined in:
lib/swamp/rails_actions/controller.rb

Instance Method Summary collapse

Instance Method Details

#action!(name, klass, *args) ⇒ Object



56
57
58
59
60
61
# File 'lib/swamp/rails_actions/controller.rb', line 56

def action!(name, klass, *args)
  define_method name do
    input = Hash[args.map { |k| [k, send(k)] }]
    action! klass, **input
  end
end