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

In place changes not updated on save

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 7.1.0
    • None
    • Attributes
    • None
    • Ruby on Rails

    Description

      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"

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: