Sha256: 485f9a1c747a4b50880f8aa76d150c803477b8ec815beaeddba803af9cf4b7fd
Contents?: true
Size: 1.88 KB
Versions: 5
Compression:
Stored size: 1.88 KB
Contents
# MightyGrid [](http://badge.fury.io/rb/mighty_grid) [](https://travis-ci.org/jurrick/mighty_grid) [](https://codeclimate.com/github/jurrick/mighty_grid) [](http://inch-pages.github.io/github/jurrick/mighty_grid) MightyGrid is a flexible grid solution for Ruby On Rails. ## Installation Add this line to your application's Gemfile: gem 'mighty_grid' And then execute: $ bundle Or install it yourself as: $ gem install mighty_grid ## Quick Start ### Controller You can define class or relation in <tt>init_grid</tt> method. ``` def index @products_grid = init_grid(Product) end ``` ### Show View ``` <%= grid @products_grid do |g| %> <% - g.column :id %> <% - g.column :name %> <% - g.column :description %> <% end %> ``` ## Usage ### General configuration options You can configure the following default values by overriding these values using <tt>MightyGrid.configure</tt> method. ``` per_page # 15 by default order_direction # 'asc' by default grid_name # 'grid' by default table_class # '' by default header_tr_class # '' by default pagination_theme # 'mighty_grid' by default ``` There's a handy generator that generates the default configuration file into config/initializers directory. Run the following generator command, then edit the generated file. $ rails g mighty_grid:config ## Contributing 1. Fork it ( http://github.com/jurrick/mighty_grid/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 new Pull Request
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mighty_grid-0.3.0 | README.md |
mighty_grid-0.2.2 | README.md |
mighty_grid-0.2.1 | README.md |
mighty_grid-0.2.0 | README.md |
mighty_grid-0.1.0 | README.md |