An open API service indexing awesome lists of open source software.

https://github.com/bf-rb/mobit

Ruby on Rails first gem
https://github.com/bf-rb/mobit

Last synced: about 2 months ago
JSON representation

Ruby on Rails first gem

Awesome Lists containing this project

README

          

# Mobit [![Gem Version](https://badge.fury.io/rb/mobit.svg)](http://badge.fury.io/rb/mobit)

```html



Afghanistan (+93)
Albania (+355)
Algeria (+213)
...
Zimbabwe (+263)



```

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'mobit'
```

or

```ruby
gem 'mobit', :git => 'git://github.com/rubybeast/mobit.git'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install mobit

## Usage

Simple Helper 'rails_phone_tag'

```erb
<%= rails_phone_tag :phone, '', required: true %>
```

Form For 'form.rails_phone_field'

```erb
<%= form_for @example do |f|%>
<%= f.rails_phone_field :phone, required: true %>
<%= f.submit %>
<% end %>
```

Simple_Form_For 'form.rails_phone'

```erb
<%= simple_form_for @example do |f|%>
<%= f.input :phone, as: :country_phone, required: true %>
<%= f.submit %>
<% end %>
```

Formtastic 'form.country_phone'

```erb
<%= semantic_form_for @example do |form| %>
<%= form.country_phone :phone, required: true %>
<%= form.submit %>
<% end %>
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/mobit/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request