Answers

Question and Answer:

  Home  Ruby on Rails Developer

⟩ Tell us what’s the difference between new, save and create?

new – makes a new object but doesn’t save it to the database

save – saves the model. If the model is new a record gets created in the database, otherwise the existing record gets updated.

create – makes a new object and saves it to the database in one go

 189 views

More Questions for you: