HABTM to call after_update?

Railsters:

Given two models, Frog and Pond, suppose we have a habtm between them

  • frogs_ponds.

This statement…

frog.ponds << Pond.new

…does not trigger any frog.after_update calls.

How can we connect frogs to ponds and update correctly when the link
itself changes - not the frogs or ponds?


Phlip

Association callbacks might float your boat:BarryKeenan.blogspot.com Learning Rails, Ruby and Other Things...

Outrageous - that was it! (and note we used :after_add,
because :update_ is irrelevant to an association table.)

On 21 Nov 2007, at 00:21, Phlip wrote:

…does not trigger any frog.after_update calls.

How can we connect frogs to ponds and update correctly when the link
itself changes - not the frogs or ponds?

Association callbacks might float your boat:

Fred