• Type: Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 7.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ruby 2.4, Rails 5.2.0

      Here is the rake task that will simulate error. Error appears only when validates line is present.

      class TestCollection
      include Mongoid::Document
      include Mongoid::Timestamps

      field :text, type: String

      validates :text, presence: true
      end

      namespace :error do
      desc "Simulate error in mongoid 7.0.0"
      task :simulate => :environment do
      test = TestCollection.new(
      text: 'text'
      )
      test.save
      end
      end

       

      by
      TheR

            Assignee:
            Unassigned Unassigned
            Reporter:
            d_rems@yahoo.com Damjan Rems
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: