Don't override error message for user's nickname uniqueness

This commit is contained in:
Marcin Kulik 2013-10-20 19:08:41 +02:00
parent 8dba31ce71
commit 4b5c02477b

View File

@ -5,12 +5,7 @@ class User < ActiveRecord::Base
has_many :comments, :dependent => :destroy
has_many :likes, :dependent => :destroy
validates :nickname, :presence => true
validates_uniqueness_of \
:nickname,
:message => "Sorry, but your nickname is already taken, " \
"choose different one"
validates :nickname, presence: true, uniqueness: true
has_many :user_tokens, :dependent => :destroy
has_many :asciicasts, :dependent => :destroy