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

magic method update_attribute

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

      I'm not going when you call update update_attribute

      ruby-1.9.2-head :016 > s = Shop.find "100000000000000730064437"
      => ....
      ruby-1.9.2-head :017 > s.dirty_trick
      => []
      ruby-1.9.2-head :018 > s.update_attribute(:dirty_trick, s.dirty_trick << "qqq")
      => true
      ruby-1.9.2-head :019 > s.dirty_trick
      => ["qqq"]
      ruby-1.9.2-head :020 > s = Shop.find "100000000000000730064437"
      => ...
      ruby-1.9.2-head :021 > s.dirty_trick
      => []
      ruby-1.9.2-head :022 >

      Use gems:
      Rails 3.0.7
      mongo (1.3.1)
      mongoid (2.0.2)
      and
      mongod --version
      db version v1.8.0, pdfile version 4.5
      Tue Jun 21 16:17:50 git version: nogitversion

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

              Created:
              Updated:
              Resolved: