asciinema.org/app/helpers/route_helper.rb
2015-10-08 12:43:10 +00:00

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