<commit_before># Datagrid

Ruby library that helps you to build and represent table-like data with:

* Customizable filtering
* Columns
* Sort order
* Localization
* Export to CSV

### ORM Support

* ActiveRecord
* Mongoid
* MongoMapper

[Create an issue](https://github.com/bogdan/datagrid/issues/new) if you want more.

### Live Demo

[Datagrid DEMO application](http://datagrid.heroku.com) is available live!
[Demo source code](https://github.com/bogdan/datagrid-demo).

<img src="http://datagrid.heroku.com/datagrid_demo_screenshot.png" style="margin: 7px">

### Example

In order to create a grid:

``` ruby
class SimpleReport

  include Datagrid

  scope do
    User.includes(:group)
  end

  filter(:category, :enum, :select => ["first", "second"])
  filter(:disabled, :eboolean)
  filter(:confirmed, :boolean)<commit_msg>Black border for screenshot<commit_after># Datagrid

Ruby library that helps you to build and represent table-like data with:

* Customizable filtering
* Columns
* Sort order
* Localization
* Export to CSV

### ORM Support

* ActiveRecord
* Mongoid
* MongoMapper

[Create an issue](https://github.com/bogdan/datagrid/issues/new) if you want more.

### Live Demo

[Datagrid DEMO application](http://datagrid.heroku.com) is available live!
[Demo source code](https://github.com/bogdan/datagrid-demo).

<img src="http://datagrid.heroku.com/datagrid_demo_screenshot.png" style="margin: 7px; border: 1px solid black">

### Example

In order to create a grid:

``` ruby
class SimpleReport

  include Datagrid

  scope do
    User.includes(:group)
  end

  filter(:category, :enum, :select => ["first", "second"])
  filter(:disabled, :eboolean)
  filter(:confirmed, :boolean)
{'fraction_non_alphanumeric': 0.12846199175014733, 'fraction_numerical': 0.0017678255745433118, 'mean_word_length': 4.736486486486487, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7610020', 'n_tokens_mistral': 581, 'n_tokens_neox': 549, 'n_words': 156}