This is actually fine. It appears that the message didn't take for me until 
I restarted Unicorn for some reason. The lit is perfect. Thanks!

On Thursday, December 12, 2013 3:09:42 PM UTC-5, Jeremy Evans wrote:
>
> On Thursday, December 12, 2013 11:41:42 AM UTC-8, Adam Gotterer wrote:
>>
>> It's been a few years since this question was asked. Is there a better 
>> way to override validation messages now?
>>
>
> As stated earlier in the thread, full_messages will now treat a 
> LiteralString was verbatim.  Since the core_extensions are not loaded by 
> default anymore:
>
>   validates_unique [:user, :group], :message => Sequel.lit('user already 
> exists for group')
>  
>
>> I'm dealing with a similar situation where I'm validation uniqueness of 
>> two columns. One of those columns is specific to the user_id, the end user 
>> only needs to know that the other column needs to be unique. So instead of 
>> 'user_id and title must be unique' I'm trying to change it to 'title must 
>> be unique'.
>>
>
> If you don't like the above solution, you can use the error_splitter 
> plugin (and the delete the error for :user_id if you are using 
> full_messages).
>
> Thanks,
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to