lib/amoeba.rb in amoeba-3.2.0 vs lib/amoeba.rb in amoeba-3.3.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'active_record'
require 'active_support/all'
require 'amoeba/version'
require 'amoeba/config'
require 'amoeba/macros'
@@ -12,7 +14,9 @@
require 'amoeba/instance_methods'
module Amoeba
end
-ActiveRecord::Base.send :extend, Amoeba::ClassMethods
-ActiveRecord::Base.send :include, Amoeba::InstanceMethods
+ActiveSupport.on_load :active_record do
+ extend Amoeba::ClassMethods
+ include Amoeba::InstanceMethods
+end