Sha256: 258e65221b5350b9c66f57fe0e8b028271a1d7883c6edc0b8ec3fa2594b25095
Contents?: true
Size: 882 Bytes
Versions: 9
Compression:
Stored size: 882 Bytes
Contents
# ActiveGrid ActiveGrid is a gem to allow Rails apps to easily add data grids that can be sorted, paginated, filtered and styled. ## Description Using the ActiveGrid gem consists of a few steps: 1) Add the following to your Gemfile and run "bundle": gem "activegrid" 2) Setup your controller to have a collection of ActiveRecord objects. Something like this would be fine: @models = Model.scoped.activegrid_filter_sort_paginate 3) In your view, add the activegrid helper <%= activegrid @products, paginate: 10 do |grid, model| %> <%= grid.column :name, filter: %W[Blah Gizmo Widget], sortable: true do %> <%= link_to model.name, product_path(model) %> <% end %> <%= grid.column :description, filter: "string", sortable: true do %> <%= model.description %> <% end %> <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems