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

udpate_all and localized fields

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Hi. I had a ploblem with updating fields with translations.
      I do this:

      Model.where(id: '_some_id_').update_all(name_translations: {en: 'some_title_in_en', uk: 'some_title_in_uk'})
      

      and this doesn't work.

      Then I tried this:

      Model.where(id: '_some_id_').update_all(name: {en: 'some_title_in_en', uk: 'some_title_in_uk'}) 
      

      and this save to 'name' the hash as string, like "{:en=>\"some_title_in_en\", :uk=>\"some_title_in_uk\"}", doesn't work anyway
      What's wrong? Thanks!

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

              Created:
              Updated:
              Resolved: