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

.only doesn't play nice with localized fields

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      In my model MyModel I have:

          field :name, type: String, localized: true
      

      I've discovered that MyModel.all.only(:name).first doesn't work well; the name field of the returned object will only contain the value for current I18n.locale, and fallbacks do not seem to work.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            johnnyshields Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: