Skip to content

Instantly share code, notes, and snippets.

@TXDynamics
Created April 24, 2013 14:10
Show Gist options
  • Select an option

  • Save TXDynamics/5452407 to your computer and use it in GitHub Desktop.

Select an option

Save TXDynamics/5452407 to your computer and use it in GitHub Desktop.
Change name of database column to show better errors
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
# When an active record error message is show it uses the column name for the validation error
# In the case of non English column names we need to create a name alias. In this case we are
# changing the column name password_digest. We are giving it the Alias of 'Password'
en:
activerecord:
attributes:
user:
password_digest: "Password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment