On Thu, Aug 11, 2011 at 2:58 PM, Leonel *.* <[email protected]> wrote:

> I have this in the user model file, user.rb
>
> validates :username,
> :presence => true,
> :uniqueness => true,
> :on => :update

> But everytime I try to change the user's first name, I get the error
> messages that the username is already taken and such.

> How can I make Rails NOT run that validation when I'm trying to update
> other fields?

Seriously?

How about removing the " :on => :update " where you're telling Rails
you *do* want to run it then?

Just a thought...  :-)

-- 
Hassan Schroeder ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

-- 
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