Make `target` a keyword argument for `user_screen_name` helper
Co-authored-by: nilsding <nilsding@nilsding.org>
This commit is contained in:
parent
46c2412ad8
commit
6643a4763f
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue