Neil Middleton
Neil Middleton

Reputation: 22238

Changing default error messages in Rails

Our client has decided that they would like all blank AR error messages to be changed from "can't be blank" to "must be completed" throughout the entire app.

What's the easiest Rails'y way of doing this?

Upvotes: 4

Views: 1902

Answers (1)

James A. Rosen
James A. Rosen

Reputation: 65232

Use config/locales/en.yml

Specifically, put the following in that file:

en:
  activerecord:
    errors:
      messages:
        blank: "must be completed"

Upvotes: 13

Related Questions