Make `target` a keyword argument for `user_screen_name` helper

Co-authored-by: nilsding <nilsding@nilsding.org>
This commit is contained in:
Karina Kwiatek 2023-05-09 23:20:36 +02:00
parent 46c2412ad8
commit 6643a4763f
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ module UserHelper
if url if url
return user_path(user) if link_only return user_path(user) if link_only
return profile_link(user, "_top") return profile_link(user, target: "_top")
end end
user.profile.safe_name.strip user.profile.safe_name.strip
end end
@ -23,7 +23,7 @@ module UserHelper
private private
def profile_link(user, target = nil) def profile_link(user, target: nil)
link_to(user.profile.safe_name, user_path(user), class: ("user--banned" if user.banned?).to_s, target:) link_to(user.profile.safe_name, user_path(user), class: ("user--banned" if user.banned?).to_s, target:)
end end