Displaying 1 result from an estimated 1 matches for "activation_handl".
2007 Jul 23
2
Acts_As_Ferret: disable_ferret and Callbacks
...l to disable ferret provided a flag and
I''m finding these callbacks aren''t quite working right.
Here''s a code sample:
class Model < ActiveRecord::Base
has_one :associated_model # This model will fill in some fields upon
it''s own validation
def save_with_activation_handling!
if active? # This part works
self.activated_at = Time.now
else
disable_ferret :once
self.activated_at = nil
end
save_without_activation_handling!
end
alias_method_chain :save!, :activation_handling
end
Any ideas?
Thank you,
James Herdman
--
Posted via...