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

validation context not working when saving

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None

      Hey, I'm hitting an odd bug.
      Here is my issue:
      Given u is a user model

      [32] pry(main)> u.valid?
      true
      [33] pry(main)> u.save
      true
      [34] pry(main)> u.valid? :checking_out
      false
      [35] pry(main)> u.save context: :checking_out
      true
      

      The u.save context: :checking_out should return false and fail.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrew.kalek@anlek.com Andrew Kalek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: