Files
bit/app/helpers/links_helper.rb
T
Juan Rodriguez cebdfb35d7 fix: parsed_url + stripped_url
- store and redirect urls without protocol
- update README
- increment counter with SQL COALESCE
- add linksHelper
- update tests
2023-03-27 09:53:09 +02:00

8 lines
138 B
Ruby

# frozen_string_literal: true
module LinksHelper
def stripped_url(url)
url.sub(%r{^.*://(www\.)?}, '').sub(/^www\./, '')
end
end