Sha256: 9c7a7981761bda9e0c5a0a4369054e8c1e523299054f1d9ff4d8538c45e4458d

Contents?: true

Size: 984 Bytes

Versions: 2

Compression:

Stored size: 984 Bytes

Contents

# PhonyNumber

This Gem adds useful methods to your Rails app to validate, display and save phone numbers.
It uses the super awesome Phony gem (https://github.com/floere/phony).

## Installation

Add this line to your application's Gemfile:

    gem 'phony_number'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install phony_number

## Usage

In your model add:

    class SomeModel < ActiveRecord::Base
      phony_normalize_numbers :phone_number, :default_country_code => 'US'
    end

Use the Phony.plausible method to validate an attribute:

    validate :phone_number, :phony_number => true

In your views use:

    <%= "some number string variable".phony_formatted(:format => :international, :spaces => '-') %>

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phony_number-0.0.2 README.md
phony_number-0.0.1 README.md