How do you create a new user object with the name david and save it to the database?

Question:How do you create a new user object with the name david and save it to the database?

1.User.build(:name => 'david')

2.User.create(:name => 'david')

3.User.new(:name => 'david')

4. User.make(:name => 'david')


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!