before_save & before_create

 before_save is called every time an object is saved. So for new and existing objects. (create and update action)

before_create only before creation. So only for new objects (create action)

Comments

Popular posts from this blog

How is the model view controller framework used in ruby on rails?

What are the different filters used in ruby on rails?