Sha256: 1f23a200bd807c3e40fa1cb73cb6de9535d4385c20e0757c5e2925002f64938e
Contents?: true
Size: 318 Bytes
Versions: 6
Compression:
Stored size: 318 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
6 entries across 6 versions & 1 rubygems