Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-806

Validation localization handling in Mongoid vs ActiveRecord

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Is there a reason that Mongoid doesn't follow the same locale lookup order that ActiveModel does for validation errors? I can see not doing it for MongoDB specific errors, but things like validates_length_of are the same in MySQL and MongoDB.

      Specifically thinking about the order described in: http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models (but with "mongoid" rather than "activerecord")

      It's a hassle when dealing with both gems like Devise and the default ActiveModel validations, since you have to reduplicate the locale strings.

      I'd be happy to try my hand at a a patch for this, but wanted to make sure it wasn't intended functionality before digging through it more.

            Assignee:
            Unassigned Unassigned
            Reporter:
            zanker Zachary Anker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: