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
- Host: GitHub
- URL: https://github.com/bf-rb/mobit
- Owner: bf-rb
- License: mit
- Created: 2015-03-09T19:06:24.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-29T16:55:32.000Z (about 11 years ago)
- Last Synced: 2026-02-10T02:47:42.571Z (4 months ago)
- Language: Ruby
- Homepage: https://rubygems.org/gems/mobit
- Size: 422 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Mobit [](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