On 13-Sep-09, at 8:48 AM, Rodrigo Rosenfeld Rosas wrote:
>>
>> I'm not sure about ActionModel, but we've been working on
>> modifications to ActiveRecord validations over on the Rails I18n list
>> and any code regarding messages is likely going to change in 3.0.
>> You're welcome to come over and discuss your concerns though.
>>
>
> I'm already subscribed to i18n list but I haven't seen any topic about
> 3.0 recently.
>
> Are there any repositories where I could take a look at the changes  
> to 3.0?

A bunch of stuff was changed in 2.3.4, but changes for 3.0 are still  
to be discussed; I was in fact planning on posting about this soon.

>
> Anyway, the patch I intend to prepare for submission is not directly
> related to I18n in my opinion.

Since error messages go through the I18n system, any changes made will  
necessarily involve the I18n code to some degree. i.e. it would be  
hard to patch any code related to full_messages without affecting I18n  
related code. Furthermore, I think that *any* code that relates to  
displaying text needs to keep I18n in mind.

>
> Please, see my comments on subject at:
>
> https://rails.lighthouseapp.com/projects/8994/tickets/1687-flexible-formatting-for-ar-validation-error-messages
>  
> #ticket-1687-36
>


Right, I hadn't checked in on that thread in a while.

As of 2.3.4, you have two possibilities:

1) you can specify a separate message and full_message per validation  
using the I18n.

2) you can change the full_message to something other than  
'{{attribute}} {{message}}', like simply '{{message}}'. This would  
mean that whatever you set as message will also be used for the  
full_message.

Now, I realize this may seem like a workaround to doing it directly in  
the model, (although I'd argue that it's probably better to have all  
the text strings in one place anyway,) but I think it does cover what  
you're trying to do?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to