>
>
>
> I have a Users model that has a bunch of verifications such as email
> being unique and password being present etc.. In my controller I want
> to do @user.save and in case this failed due to the email not being
> unique (The user being created is already present in the db),
>

In controller, You can get what error you get.
Like,
@user.errors
@user.errors[:name]
 @user.errors.size // this will show how many errors.


Regards
sathia

Here I share my experience in open source.
http://www.sathia27.wordpress.com
<http://www.sathia27.wordpress.com/>http://www.lquery.com<http://www.sathia27.wordpress.com/>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to