Do not automatically include TheModerator::Model in ActiveRecord::Base

When automatically including the module in ActiveRecord::Base, it gives
a hierarchy error with Rails 4.
The module must be included in the required models.
master
Guillaume Dott 2014-08-07 17:40:29 +02:00
parent 31ba046295
commit 9268dfb0b9
2 changed files with 0 additions and 11 deletions

View File

@ -2,5 +2,3 @@ require 'the_moderator/version'
require 'the_moderator/exceptions'
require 'the_moderator/model'
require 'the_moderator/moderation_model'
require 'the_moderator/railtie' if defined?(Rails)

View File

@ -1,9 +0,0 @@
module TheModerator
class Railtie < Rails::Railtie
initializer "the_moderator.include_in_active_record" do
ActiveSupport.on_load :active_record do
include TheModerator::Model
end
end
end
end