Search This Blog

Monday, April 4, 2011

Validation message showing as {{attribute}} {{message}}


Typically the model validations is shown at the top of a reloaded form so the user can take action and resubmit.

Today, I started seeing the following message instead of the validation/error messages while I was testing some new functionality in a form:

{{count}} errors prohibited this {{model}} from being saved
{{attribute}} {{message}}
{{attribute}} {{message}}


This is caused coz, I had upgraded the i18n gem from 0.4.2 to 0.5.0.  All I had to do was install 0.4.2 and remove 0.5.0 and my error messages started showing correctly again.

Here is the command to uninstall the i18n v0.5.0 gem:

sudo gem uninstall i18n --version=0.5.0

And then, restart the server.. Problem solved :)

No comments:

Post a Comment