Hello,
Can anybody give me a hint on the format of :message? I have:
validates_uniqueness_of :username, :scope => :group, :case_sensitive
=> false,
:message => "%{fn} already exists in %{fn}."
I get "Userame already exists in Userame." Yuck!
When creating a duplicate with create(:username => ''userA'',
:group =>
''groupB''), how can I make it "userA already exists in
groupB." ???
By the way, where are the :message format and the usage of %{fn} and %d
documented? I''ve tried AWDWR 2nd ed., PickAxeII and Rails docs...
Thanks in advance!
--
Posted via http://www.ruby-forum.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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---