Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Httpify

Build Status

Adds a method on String to add the http(s) prefix

Usage

Use directly on any String object or include in your ActiveRecord model and specify any attributes you wish to automatically be prefixed with http://...

Example

class Link
  include Httpify
  attr_accessor :url
  httpify :url
end

link = Link.new
link.url = "google.com"
link.url # Returns http://google.com

The gem also exposes a method on String

"mydomain.com".httpify

Options available:

"mydomain.com".httpify(:https => true, :trailing_slash => true)

Copyright

Copyright (c) 2010 Kieran Johnson. See LICENSE for details.

About

Adds a method on String to add the http(s) prefix

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages