(Or vice versa.)
Ask for Help
“How can we control popup windows when we’re testing with Capybara?”
See the method
“How can I stub the current_user in a helper spec?”
#current_user on the
helper object in the spec.
In your AR model, if you do this
after_update :do_foo, :if => :bar_changed? after_update :do_foo, :if => :qux_changed?
#do_foo will only be called after an update where
qux has changed, not one where only
bar has changed. The callbacks are keyed by the methods they call, so the second callback overwrites the first one entirely.