rails-observers
rails-observers copied to clipboard
Rails observer (removed from core in Rails 4.0)
Bug: disabling an observer that observes any of ```around_*``` filters, will prevent observable ActiveRecord model from saving. Solution: when ```disabled_for?(object)``` is true we need to invoke provided ```&block``` so that...
If you observe `ActiveRecord::Base` in order to do something if any model is changed there is some bug in how the observers lists are created causing the app boot to...
I'm using Capybara for integration testing. My observers work fine in my app and in my regular tests, but Capybara feature tests do not trigger any observers no matter what...
I'm in the process of upgrading out Rails 3.2 app to Rails 4.1.5. When I run the full test suite (rake test) teh observer callbacks are fired. However, when I...
- This was happening when a subclass of an observed class was created. - The subclass was being observed twice. - I've changed one of the tests to catch this.
The current implementation of enabling/disabling observers has side effects into other threads. I understand that the set of observers per model should be global, but disabling an observer is usually...
I keep getting this error when I start a Rails 4.2.4 application consuming a Rails Engine with a Mailer Observer configured. Details are below with some code information replaced with...
So that new developers can know that it exists, and know when it is called.
Please can anyone tell me how to create a sweeper file?
Upgrade our app from Rails 3.2 to Rails 4.1.5. When I run the app in development mode I can access Devise's current user within a Sweeper's callback. However, when I...