Showing posts with label has_many. Show all posts
Showing posts with label has_many. Show all posts

Monday, January 14, 2013

The not so famous before_remove/before_add & after_remove/after_add callbacks.

Well, this is another rails feature and a quite nice one which is not documented properly.

While using has_many :through associations, we can use before_remove, before_add, after_remove, after_add callbacks.