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

.only doesn't play nice with localized fields

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Ruby Sprint 34, Ruby Sprint 35, Ruby Sprint 36, Ruby Sprint 37, Ruby Sprint 38, Ruby Sprint 39

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: