Trap
Bootstrap helpers
Installation
Add this line to your application's Gemfile:
gem 'trap'
And then execute:
$ bundle
Or install it yourself as:
$ gem install trap
Usage
After installing you should add line to application_helper.rb
module ApplicationHelper
include Trap
end
List of methods you can use with Trap:
- menu_item Bootstrap navbar item
<%= menu_item 'ButtonText', 'ButtonLink', class: 'some-classes', another_option: :value %>
Using menu_item
instead of
<li>
<a href="ButtonLink">
ButtonText
</a>
</li>
Contributing
- Fork it ( https://github.com/[my-github-username]/trap/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request