Skip to content

Commit

Permalink
Remove observers from the railtie
Browse files Browse the repository at this point in the history
This was moved to the rails-observers gem

Fixes #221
  • Loading branch information
rafaelfranca committed Jun 27, 2016
1 parent 07e83b2 commit 6c4c02b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/active_resource/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ class Railtie < Rails::Railtie
ActiveResource::Base.send "#{k}=", v
end
end

config.after_initialize do |app|
ActiveSupport.on_load(:active_resource) do
ActiveResource::Base.instantiate_observers

# Rails 5.1 forward-compat. AD::R is deprecated to AS::R in Rails 5.
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader
reloader.to_prepare do
ActiveResource::Base.instantiate_observers
end
end
end
end
end

1 comment on commit 6c4c02b

@natebird
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.