Show previous usernames to members; link to actual change requests.

This commit is contained in:
evazion
2017-01-11 13:07:39 -06:00
parent 87bcc07fae
commit 1f325c19da
4 changed files with 15 additions and 4 deletions

View File

@@ -233,7 +233,7 @@ class UserPresenter
end
end
def previous_names
UserNameChangeRequest.approved.where("user_id = ?", user.id).map(&:original_name).join(", ")
def previous_names(template)
user.user_name_change_requests.map { |req| template.link_to req.original_name, req }.join(", ").html_safe
end
end