-
Type: Sub-task
-
Resolution: Duplicate
-
Priority: 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