Sha256: 6e08aea5594755b4857b48895026235ef225e45f6d7017356ca2aed839e11c6f
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
{<img src="https://codeclimate.com/github/mattways/tuning.png" />}[https://codeclimate.com/github/mattways/tuning] {<img src="https://travis-ci.org/mattways/tuning.png?branch=master" alt="Build Status" />}[https://travis-ci.org/mattways/tuning] {<img src="https://gemnasium.com/mattways/tuning.png" alt="Dependency Status" />}[https://gemnasium.com/mattways/tuning] = Tuning Common used tools extracted into a gem. = Install Put this line in your Gemfile: gem 'tuning' Then bundle: $ bundle = Controllers (This plugin will create an error method to force debug information on exceptions in development env) Use not_found method to show 404.html in your controller: not_found Use forbidden method to show 422.html in your controller: forbidden Use redirect_with_flash to directly redirect with flash inside your controller: redirect_with_flash home_path, :success, 'success message' Use flash_errors method to directly flash models errors inside your controller: flash_errors model = Views Use conditional_tag if you want wrap content into some tag if certain condition it's true in your views: <%= conditional_tag :h1, request.path == home_path do %> <%= link_to 'Home', home_path, id: 'logo' %> <% end %> User active_menu? if you want to add an active class to some tag in your views: <li class="<%= active_menu? some_path %>"></li> The method submit_tag outputs a button with span inside: <button name="commit" value="submit"> <span>Send</span> </button>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tuning-0.0.9 | README.rdoc |