Sha256: 304c571b282f6fc767463301c1a177545a4f3ccc7132cc2ccbc04ddf99a6028a

Contents?: true

Size: 987 Bytes

Versions: 1

Compression:

Stored size: 987 Bytes

Contents

= Shortener

Shortener makes it easy to create shortened URLs for your rails application.

== Installation

You can use the latest Rails 3 gem with the latest Shortener gem. In your Gemfile:

  gem 'shortener'
  
After you install Shortener run the generator:

  rails generate shortener
  
This generator will create a migration to create the shortened_urls table where your shortened URLs will be stored.

== Usage

To generate a Shortened URL object for the URL "http://dealush.com" within your controller / models do the following:
  
  Shortener::ShortenedURL.generate("http://dealush.com")
  
or

  Shortener::ShortenedURL.generate("dealush.com")

To generate and display a shortened URL in your application use the helper method:

  shortened_url("dealush.com")
  
This will generate a shortened URL. store it to the db and return a string representing the shortened URL.

== Notes

This is the first release and still has some bugs. I will be releasing fixes for these bugs soon.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shortener-0.0.1 README.rdoc