Flowdock
add_autosave_association_callbacks(reflection) private

Adds a validate and save callback for the association as specified by the reflection.

For performance reasons, we don’t check whether to validate at runtime, but instead only define the method and callback when needed. However, this can change, for instance, when using nested attributes, which is called after the association has been defined. Since we don’t want the callbacks to get defined multiple times, there are guards that check if the save or validation methods have already been defined before actually defining them.

Show source
Register or log in to add new notes.