Sha256: 7082290949f34fe70ea2cb9d8b8d6712081640a127304395603a8545086a75b8
Contents?: true
Size: 530 Bytes
Versions: 5
Compression:
Stored size: 530 Bytes
Contents
module ActionController module EventHelper def trigger_events(object, *changes) options = changes.extract_options! # changes += object.state_changes changes.uniq.each do |change| trigger_event(object, change, options) end end def trigger_event(object, change = nil, options = {}) type = :"#{object.class.name.underscore}_#{change}" Adva::Event.trigger type, object, self, options end end end ActionController::Base.send :include, ActionController::EventHelper
Version data entries
5 entries across 5 versions & 1 rubygems