lib/insque.rb in insque-0.4.0 vs lib/insque.rb in insque-0.4.1
- old
+ new
@@ -117,10 +117,10 @@
def self.acts_as_insque_crud(*args)
options = args.extract_options!
excluded = (options[:exclude] || []).map(&:to_s)
[:update, :create, :destroy].each do |action|
- set_callback action, :after do
+ set_callback :commit, :after, on: action do
params = self.serializable_hash(options).delete_if {|key| (['created_at', 'updated_at'] + excluded).include? key}
Insque.broadcast :"#{self.class.to_s.underscore}_#{action}", params
end
end
end