Skip to content

Commit

Permalink
Merge pull request #48 from LaunchPadLab/active-record-autoloading-issue
Browse files Browse the repository at this point in the history
fix dependency issue with how TokenMaster::Model module is added to A…
  • Loading branch information
francirp authored Oct 30, 2017
2 parents 8e2efbf + b3d44fc commit ff8c32a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/token_master/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ class Railtie < ::Rails::Railtie

initializer 'token_master.active_record' do
ActiveSupport.on_load :active_record do
if Rails::VERSION::MAJOR >= 5
::ApplicationRecord.include(TokenMaster::Model)
else
::ActiveRecord::Base.include(TokenMaster::Model)
end
include TokenMaster::Model
end
end
end
Expand Down

0 comments on commit ff8c32a

Please sign in to comment.