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

Allow passing hashes directly to localized fields.

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

      Allows setting localized fields using mass-assignment:

      document.title = { en: 'English', de: 'Deutsch' }
      

      I need this functionality the get following code – it reverts to a previous version, using Mongoid::Versioning – working:

      update_attributes(versions.last.versioned_attributes.except('version'))
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            haihappen haihappen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: