#13 ✓resolved
iain

AR custom messages

Reported by iain | August 31st, 2008 @ 12:21 PM

As discussed in http://groups.google.com/group/r...

It took me a while to get the right epiphany. It is now a quite obvious fix.


Topic.validates_presence_of :title, :message => :custom_error
# will translate :custom_error as if it was :blank.

Comments and changes to this ticket

  • iain
  • Sven Fuchs

    Sven Fuchs August 31st, 2008 @ 11:21 PM

    • State changed from “new” to “resolved”

    Yeah, thanks for the headsup.

    Closing this ...

  • Ramonaka

    Ramonaka May 12th, 2025 @ 10:09 AM

    Okay, I had a similar head-scratching moment recently with Rails validations! It's frustrating when you expect a custom error message to show up, but it just defaults to the standard blank message. This :custom_error behaving like :blank is a good thing to highlight for others. Sometimes, debugging these issues feels like navigating a really tricky level in a fast-paced game where one wrong move and you have to start over. It's like playing a Slope Game, where one miscalculation sends you tumbling! Thanks for sharing the fix, it might save someone else a lot of time.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff

People watching this ticket

Attachments

Pages