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

Model#touch results in NoMethodError: undefined method `touch'

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0.rc0, 7.0.2
    • Affects Version/s: 7.0.0, 7.0.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ruby 2.3.1
      Rails 5.2.0

      It seems touch is gone as a method on Mongoid::Document. The following test:

      class MongoidTouchTest
        include Mongoid::Document
      end
      
      describe MongoidTouchTest do
        subject { MongoidTouchTest.new }
        it { subject.must_respond_to(:touch) }
      end
      

      Results in:

      MongoidTouchTest
        test_0001_                                                      FAIL (0.05s)
      Minitest::Assertion:         Expected #<MongoidTouchTest _id: 5af2c487a54d75226b04c1c1, > (MongoidTouchTest) to respond to #touch.
      
      
      Finished in 0.05541s
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips
      

      Is touch no longer supported?

       

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            asgerb Asger Behncke Jacobsen
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: