railtie to rails
This commit is contained in:
parent
c40b9f0fcc
commit
3164e5a59b
|
@ -4,4 +4,6 @@ module ActsAsFollowable
|
|||
autoload :Followable, 'acts_as_followable/followable'
|
||||
# autoload :Follower, 'acts_as_followable/follower'
|
||||
autoload :FollowExt, 'acts_as_followable/follow_ext'
|
||||
|
||||
require 'acts_as_followable/railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
|
||||
end
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
require 'acts_as_follower'
|
||||
require 'rails'
|
||||
|
||||
module ActsAsFollower
|
||||
class Railtie < Rails::Railtie
|
||||
|
||||
initializer "acts_as_followable.active_record" do |app|
|
||||
ActiveSupport.on_load :active_record do
|
||||
# include ActsAsFollowable::Follower
|
||||
include ActsAsFollowable::Followable
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue