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

In place changes not updated on save

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.1.0
    • Component/s: Attributes
    • Labels:
      None
    • Environment:
      Ruby on Rails

      In place modifier function calls such as .gsub! on attributes do not update on save.

      > foo = Foo.first
      > foo.bar
      "My random value"
      > foo.bar.gsub!(/random/, '')
      "My  value"
      > foo.changed?
      false
      > foo.save # does not changes value of bar to "My  value"
      > foo.bar
      "My  value"
      > foo = Foo.first
      > foo.bar
      "My  value"

            Assignee:
            emily.giurleo@mongodb.com Emily Giurleo (Inactive)
            Reporter:
            arslan_21@rocketmail.com Arslan Chattha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: