Tag: ruby on rails projects

Callbacks in Rails

WARNING. after_save is fired on both creation and update, but always after the more specific after_create and after_update callbacks, regardless of the order in which the macro calls are fired. NOTE: The before_destroy callback must be placed before dependent: :destroy bindings (or use the prepend: true option) to ensure that they are executed before the […]