lib/action_callback.rb in action_callback-0.2.0 vs lib/action_callback.rb in action_callback-0.2.1
- old
+ new
@@ -15,7 +15,8 @@
end
end
end
if defined?(Rails)
- ActiveRecord::Base.extend(ActionCallback)
+ base_model = Rails.version >= '5.0' ? ApplicationRecord : ActiveRecord::Base
+ base_model.extend(ActionCallback)
end
\ No newline at end of file