Don't ignore the parameter of MergeRequestsHelper#mr_change_branches_path
What does this MR do?
Let MergeRequestsHelper#mr_change_branches_path use its parameter merge_request
instead of @merge_request
, thus making it not confusing.
Are there points in the code the reviewer needs to double check?
mr_change_branches_path is called at _branch_chooser.html.haml L21:
= link_to 'Change branches', mr_change_branches_path(issuable)
_branch_chooser.html.haml is called by shared/issuable/_form.html.haml, which is called by projects/merge_requests/_form.html.haml
None of them has spec tests.
Why was this MR needed?
Make the code less confusing and fragile.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
[ ] Changelog entry added[ ] Documentation created/updated[ ] API support added- Tests
[ ] Added for this feature/bug-
All builds are passing
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together