Ruby on Rails Developer Question: Download Questions PDF
Tell us what’s the difference between new, save and create?
![Ruby on Rails Developer Interview Answer Ruby on Rails Developer Interview Question](https://globalguideline.com/public/images/interview/32.png)
Answer:
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
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
Download Ruby on Rails Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell us what are benefits of using Active Record as opposed to raw SQL queries? | Tell us what is the use of super function in Ruby on Rails? |