Refactor password to remove duplicate functionality
These two links do the same thing.
https://gitlab.com/profile/password/edit
https://gitlab.com/profile/password/new
This came to light when I was investigating a related issue:
https://gitlab.com/gitlab-org/gitlab-ce/issues/38768#note_42586708
This refactor would also fix that bug. Double win!
Copypasta from the bugs discussion:
/ /
Karl Hickey @karlhic commented about an hour ago
passwords/new and passwords/edit are pretty much identical. Compare:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/profiles/passwords/edit.html.haml
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/profiles/passwords/new.html.haml
So it seems to me the best solution would be to find all instances of new and replace with edit. @markglenfletcher I could give this a shot if you assign me. Would I be correct in thinking it wouldn't be too hairy a job? Does my approach seem OK?
/ /
Mark Fletcher @markglenfletcher commented less than a minute ago Developer
@karlhic Thanks for looking into that. The views are fairly similar and the form could probably be extracted into a partial. However, that's a refactor and different to the bug that this issue aims to address. Could you raise a new issue about the potential refactor and tag me there?