Sha256: 324c99d6aefea5a8cf5eb035919c489f5bb5a08e54ad20e4a11e8bfdfaea079c
Contents?: true
Size: 1.88 KB
Versions: 2
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:install ## 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mighty_grid-0.5.0 | README.md |
mighty_grid-0.4.0 | README.md |