method
before_save
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
before_save()
public
Is called before Base.save (regardless of whether it’s a create or update save).
Register or
log in
to add new notes.
maratk -
February 25, 2010
![Default_avatar_30](https://www.gravatar.com/avatar/b260f189af1311725283275301145509?default=http://apidock.com/images/default_avatar_30.png&size=30)
1 thank
Saving other objects inside before_save
Don’t call .save or .update_attribute on other objects inside before_save callback.
Saving other objects inside of before_save callback results in flushing changed hash and the original object is not updated.
UPDATE observed sometimes, still investigating