Trouble redefining ActiveRecord default error messages


I’m redefining ActiveRecord::Errors.default_error_messages in order
to translate ActiveRecord’s validation messages. I’m putting the
redefinition in config/environment.rb.

The trouble is that I’ve found that this approach works as long as I’m
running in development mode under WEBrick, but not on my ISP under
production mode. I guess the issue should be related to caching Ruby
classes, but I can’t quite figure out what’s going wrong. Any help?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs