What is the preferred method of validating that the name has been set?

Question:What is the preferred method of validating that the name has been set?

1.validates :name, :presence => true

2.save!

3.before_save if name != nil return true end return false end

4.validates :name => not_null


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!