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
parent
31ba046295
commit
9268dfb0b9
|
@ -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)
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue