Source::URL: add profile_url method.
Add a method for converting a source URL into a profile URL. This will be used for normalizing profile URLs in artist entries. Also add the ability to parse a few more profile URL formats.
This commit is contained in:
@@ -142,6 +142,10 @@ module Source
|
||||
end
|
||||
end
|
||||
|
||||
def profile_url
|
||||
"https://www.deviantart.com/#{username}" if username.present?
|
||||
end
|
||||
|
||||
def pretty_title
|
||||
title.titleize.strip.squeeze(" ").tr(" ", "-") if title.present?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user