lib/after_commit.rb in yipdw-after_commit-0.0.0 vs lib/after_commit.rb in yipdw-after_commit-0.0.1
- old
+ new
@@ -29,5 +29,14 @@
def self.committed_records_on_destroy=(committed_records)
@@committed_records_on_destroy = committed_records
end
end
+
+require 'after_commit/active_record'
+require 'after_commit/connection_adapters'
+
+ActiveRecord::Base.send(:include, AfterCommit::ActiveRecord)
+
+Object.subclasses_of(ActiveRecord::ConnectionAdapters::AbstractAdapter).each do |klass|
+ klass.send(:include, AfterCommit::ConnectionAdapters)
+end