Project

httpify

0.0
No commit activity in last 3 years
No release in over 3 years
Prefixes any httpified elements with http:// should they be missing this
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.8

Runtime

 Project Readme

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.