Skip to content

maxschulze/acts_as_bitly_url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

based on acts_as_tiny_url by Brendan G. Lim (brendangl@gmail.com)

Description

ActsAsBitlyURL utilizes Bit.ly’s API to allow you to pass in any URL and have it generate a shortened URL on the fly.

By default you can use the +bitly_url()+ method in all your controllers, views and models.

Options

The :validate_uri option allows you to check, before trying to retrieve a URL, whether or not it is formatted correctly.

Example Usage

bitly_url("http://google.com")			
# returns http://bit.ly/da7vQs

bitly_url("http://brendanlim.com", :validate_uri => true)
# returns true

bitly_url("http/brendanlim.com", :validate_uri => true)
# returns false

Copyright © 2008 Max Schulze (max@maxschulze.com), released under the MIT license

About

Mapper for Shortlinking the Bit.ly API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages