= g_already_grid
http://github.com/midas/g_already_grid/tree/master
== DESCRIPTION:
A Guilded (http://github.com/midas/guilded/tree/master) Rails component that generates a rich grid control from an
ActiveRecord collection.
== FEATURES:
- Easily generate a rich grid from an ActiveRecord collection
- Can integrate with mislav-will_paginate to provide paging controls
- Can generate sorting links in headers
- Can do a check box column for multi-selecting
- Automatically renders a check all and adds check all behavior if check box column option
== INSTALL:
sudo gem install midas-g_already_grid
In Rails environemnt.rb file:
config.gem 'midas-g_already_grid', :version => '1.0.2', :lib => 'g_already_grid', :source => 'http://gems.github.com'
== USAGE:
Simplest case:
<%= g_already_grid @items, :id => "items-grid", :cols => [:name, :is_active] %>
Add sorting (by name column only):
<%= g_already_grid @items, :id => "items-grid", :cols => [:name, :is_active], :sort => [:name] %>
Add scoping for nested models (deeply nested):
<%= g_already_grid @items, :id => "items-grid", :cols => [:name, :is_active], :sort => [:name],
:scoped_by => @account %>
Add shallow argument to use shallow nesting:
<%= g_already_grid @items, :id => "items-grid", :cols => [:name, :is_active], :sort => [:name],
:scoped_by => @account, :shallow => true %>
== REQUIREMENTS:
== LICENSE:
(The MIT License)
Copyright (c) 2009 C. Jason Harrelson (midas)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.