[Rails5] Update `ApplicationController#log_exception` to fix `undefined method 'clean'` error
What does this MR do?
The ApplicationController#log_exception
method overrides Rails' one.
In Rails 5.0 the method was updated.
This MR updates the method to fit the Rails' one and fixes the error:
1) Projects::TodosController Merge Requests POST create when not authorized for merge_request doesn't create todo
Failure/Error: application_trace = ActionDispatch::ExceptionWrapper.new(env, exception).application_trace
NoMethodError:
undefined method `clean' for #<Hash:0x000055be5bda35d0>
Did you mean? clear
# ./app/controllers/application_controller.rb:113:in `log_exception'
# ./app/controllers/application_controller.rb:40:in `block in <class:ApplicationController>'
# ./spec/controllers/projects/todos_controller_spec.rb:80:in `go'
# ./spec/controllers/projects/todos_controller_spec.rb:138:in `block (6 levels) in <top (required)>'
# ./spec/controllers/projects/todos_controller_spec.rb:138:in `block (5 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# ActiveRecord::RecordNotFound:
# Couldn't find MergeRequest
# ./app/finders/concerns/finder_methods.rb:19:in `raise_not_found_unless_authorized'
Finished in 7.53 seconds (files took 12.8 seconds to load)
1 example, 1 failure
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
Screenshots (if relevant)
No.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)