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

why Mongoid::Errors::Validations removed the document attribute?

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

      Hi:

      I just upgrade mongoid from 2.x to 3.x, and found this commit(25a43e16a77858910b20cb6e5e5a4909fde8e4a1) removed the document attributes, I use create! in my controller ,and use rescue_from to global handle the error, so I need error.docuemnt.
      Is there any chance to get back the document attribute? or I do it the wrong way ..

      rescue_from Mongoid::Errors::Validations,       with: :render_validation_error
      

      thanks

            Assignee:
            Unassigned Unassigned
            Reporter:
            niedhui dianhui
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: