search for: without_listeners

Displaying 1 result from an estimated 1 matches for "without_listeners".

2009 Sep 27
1
Switchboard - Easy to use global ActiveRecord event listeners
...cify which ones you''d like to use: Switchboard.with_listeners AuditListener, ActivityListener do Article.create! :title => "foo" end After the block runs, the original listeners are restored. If you want to run some code with no listeners, you can do so with: Switchboard.without_listeners do Article.create! :title => "foo" end To contribute: http://github.com/zilkey/switchboard