Simplify logic
Andrew Kane
committed Jun 11, 2017
commit 36691f9733404e729da2d8e1d6e370b4bd230962
Showing 1
changed file with
2 additions
and 3 deletions
ahoy.rb b/lib/ahoy.rb
+2
-3
| @@ | @@ -117,12 +117,11 @@ end |
| if defined?(Rails) | |
| ActiveSupport.on_load(:action_controller) do | |
| - | ActionController::Base.send :include, Ahoy::Controller |
| - | ActionController::API.send :include, Ahoy::Controller if defined?(ActionController::API) |
| + | include Ahoy::Controller |
| end | |
| ActiveSupport.on_load(:active_record) do | |
| - | ActiveRecord::Base.send(:extend, Ahoy::Model) |
| + | extend Ahoy::Model |
| end | |
| # ensure logger silence will not be added by activerecord-session_store | |