module AASM

def process_args(event, from_state, *args)

the event given the from_state
element from args if it is a valid to_state for
Takes args and a from state and removes the first
def process_args(event, from_state, *args)
  # If the first arg doesn't respond to to_sym then
  # it isn't a symbol or string so it can't be a state
  # name anyway
  return args unless args.first.respond_to?(:to_sym)
  if event.transitions_from_state(from_state).map(&:to).flatten.include?(args.first)
    return args[1..-1]
  end
  return args
end