class Jsm::EventExecutor::Mongoid

Public Instance Methods

execute_action(event, obj) click to toggle source
# File lib/jsm/event_executor/mongoid.rb, line 2
def execute_action(event, obj)
  return false unless can_be_executed?(event, obj)
  # do transaction to prevent shit happen
  event.execute(obj)
  obj.save
end