NavLinkTo
Simple
Installation
Add this line to your application's Gemfile:
gem "nav_link_to", "~> 0.0.3"
And then execute:
$ bundle
Or install it yourself as:
$ gem install nav_link_to
Usage
nav_link_to 'Home', root_path
nav_link_to 'Home', root_path, 'myClass'
nav_link_to 'Home', root_path, nil, id:'myId'
# Class is a necessary param if you want to use another attribute after, but you can set it 'nil'
will return
<li class="active"><a href="/admin">Home</a></li>
<li class="active myClass"><a href="/">Home</a></li>
<li class="active" id="myId"><a href="/admin">Home</a></li>
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request