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

https://github.com/jimmyn/rails_view_helpers

Few rails view helpers
https://github.com/jimmyn/rails_view_helpers

Last synced: about 2 months ago
JSON representation

Few rails view helpers

Awesome Lists containing this project

README

        

# RailsViewHelpers
Simple set of Rails View Helpers.
This gem includes 'active_link_to' and 'phone' gems

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rails_view_helpers'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_view_helpers

## Usage
```
ext_link_to 'twitter.com/granitweet'
=> twitter.com/granitweet

ext_link_to 'https://twitter.com/granitweet'
=> https://twitter.com/granitweet

phone_link_to '9213467823'
=> +7 (921)346 7823

phone_link_to '1234567'
=> +7 (812)123 4567
```
To change default codes use
```
Phoner::Phone.default_country_code = '7'
Phoner::Phone.default_area_code = '812'
```

## Contributing

1. Fork it ( https://github.com/[my-github-username]/rails_view_helpers/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