Interviewer And Interviewee Guide

Ruby on Rails Developer Interview Question:

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

Submitted by: Muhammad
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
Submitted by: Muhammad

Read Online Ruby on Rails Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.