Sha256: 35d7825a24bd92fc7d6a5c1242e265ff4f3f277edea920082abe91b426664970
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
{<img src="https://codeclimate.com/github/mattways/rails_contrib.png" />}[https://codeclimate.com/github/mattways/rails_contrib] {<img src="https://travis-ci.org/mattways/rails_contrib.png?branch=master" alt="Build Status" />}[https://travis-ci.org/mattways/rails_contrib] {<img src="https://gemnasium.com/mattways/rails_contrib.png" alt="Dependency Status" />}[https://gemnasium.com/mattways/rails_contrib] = Rails Contrib Adds contributions to the core of Rails. = Install Put this line in your Gemfile: gem 'rails_contrib' 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 %a#logo{ :href => home_path }= Home User active_menu? if you want to add an active class to some tag in your views: %li{ :class => active_menu?(some_path) } The method submit_tag outputs a button with span inside: <button name="commit" value="submit"> <span>Send</span> </button>
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rails_contrib-0.0.8 | README.rdoc |
rails_contrib-0.0.7 | README.rdoc |
rails_contrib-0.0.6 | README.rdoc |
rails_contrib-0.0.5 | README.rdoc |