You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/helpers/route_helper.rb

16 lines
247 B
Ruby

module RouteHelper
def profile_path(user)
if user.username
public_profile_path(username: user.username)
else
unnamed_user_path(user)
end
end
def profile_url(user)
root_url[0..-2] + profile_path(user)
end
end