Sha256: 8584e238524536fa974956474be4ce6dc18ab27fdaad38170cfa3fb197fc44c3

Contents?: true

Size: 320 Bytes

Versions: 4

Compression:

Stored size: 320 Bytes

Contents

module MongoidShortener
  module ShortenedUrlsHelper
    # generate a url from either a url string, or a shortened url object
    def shortened_url(url)
      raise "Only String accepted: #{url}" unless url.class == String
      short_url = MongoidShortener::ShortenedUrl.generate(url)
      short_url
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid_shortener-1.1.0 app/helpers/mongoid_shortener/shortened_urls_helper.rb
mongoid_shortener-1.0.3 app/helpers/mongoid_shortener/shortened_urls_helper.rb
mongoid_shortener-1.0.2 app/helpers/mongoid_shortener/shortened_urls_helper.rb
mongoid_shortener-1.0.1 app/helpers/mongoid_shortener/shortened_urls_helper.rb