Happy Phone Number

0.0.2 MIT/X Consortium License    
  UNRATED

  76 downloads

A Rails plugin to format phone number

description

download

specs

Happy Phone Number is an open source plugin for Rails, allowing users to effortlessly format phone numbers from Rails models.

At the moment it supports the following countries: Belgium (:be), Denmark (:dk), France (:fr) and Iceland (:is). Happy Phone Number works only if the phone number is saved with digits.

Installation instructions:

gem 'happy_phone_number', :git => 'git://github.com/lkdjiin/happy_phone_number.git'

Usage instructions:

Add the happy_phone_number method in your Rails model, like this:

class Contact < ActiveRecord::Base
 attr_accessible :email, :name, :phone, :fax
 happy_phone_number
end


Now, in your views, you can use:

happy_phone(:fr)
happy_fax(:fr)
...
read more   
Last updated on May 10th, 2013
Happy Phone Number - A demonstration that assumes you have a Contact model with a phone attribute.

0 User reviews so far.

SUBMIT

#format phone number #format number #Rails model #phone #number #format #Rails