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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 3.0.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              dianhui
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: