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

Adding localize to existing field makes it unchangeable

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Steps to reproduce:

      • Create a model with a string field.
      • Create and save an instance of the model with the string field populated.
      • Add localize: true to the field.

      Trying to edit the instance's string field like:
      instance.string_field = 'make me a hash'
      throws:
      NoMethodError: undefined method `merge!' for "example":String

      It wants a hash but can't be changed because string case is not handled.

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            kaizencodes Szatmari Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: