Move AR include into engine file.
This commit is contained in:
parent
5386874eca
commit
aef6acc583
|
@ -69,5 +69,3 @@ module Impressionist
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.send(:include, Impressionist::Impressionable)
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ require "impressionist"
|
||||||
require "rails"
|
require "rails"
|
||||||
|
|
||||||
module Impressionist
|
module Impressionist
|
||||||
class Engine < Rails::Engine
|
class Engine < Rails::Engine
|
||||||
initializer 'impressionist.extend_ar' do |app|
|
initializer 'impressionist.extend_ar' do |app|
|
||||||
ActiveRecord::Base.extend Impressionist::Impressionable
|
ActiveRecord::Base.send(:include, Impressionist::Impressionable)
|
||||||
end
|
end
|
||||||
|
|
||||||
initializer 'impressionist.controller' do
|
initializer 'impressionist.controller' do
|
||||||
ActiveSupport.on_load(:action_controller) do
|
ActiveSupport.on_load(:action_controller) do
|
||||||
include ImpressionistController::InstanceMethods
|
include ImpressionistController::InstanceMethods
|
||||||
|
|
Loading…
Reference in New Issue