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

Document model#update in tutorial

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Docs
    • None

      There is an api doc for this method in lib/mongoid/persistable/updatable.rb:

            # Update the document attributes in the database.
            #
            # @example Update the document's attributes
            #   document.update(:title => "Sir")
            #
            # @param [ Hash ] attributes The attributes to update.
            #
            # @return [ true, false ] True if validation passed, false if not.
            #
            # @since 1.0.0
      

      This doesn't say whether a document will be updated if validation failed, and according to 4597 we do that on a has_many association.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: