Module: Riveter::Command

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/riveter/command.rb

Defined Under Namespace

Classes: Base

Instance Method Summary collapse

Instance Method Details

#submit(*args) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/riveter/command.rb', line 39

def submit(*args)
  params = args.extract_options!

  # filter and clean params before applying
  apply_params(
    clean_params(
      filter_params(params)
    )
  )

  # perform validations, and proceed if valid
  return false unless self.can_perform?

  # all good, perform the action
  self.perform(*args)
end