Sha256: a4b8b41a7734db086ec6ad2838b40377cf95138214736ee97c2b9091bda508e7
Contents?: true
Size: 306 Bytes
Versions: 2
Compression:
Stored size: 306 Bytes
Contents
module Shortener::ShortenerHelper # generate a url from a url string def short_url(url, owner=nil) short_url = Shortener::ShortenedUrl.generate(url, owner) short_url ? url_for(controller: :"shortener/shortened_urls", action: :show, id: short_url.unique_key, only_path: false) : url end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shortener-0.4.1 | app/helpers/shortener/shortener_helper.rb |
shortener-0.4.0 | app/helpers/shortener/shortener_helper.rb |