No commit activity in last 3 years
No release in over 3 years
'sortable_columns' is a clean and lightweight solution for making table columns sortable.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

sortable_columns¶ ↑

A clean and lightweight solution for making table columns sortable.

Install¶ ↑

Put this line in your Gemfile:

gem 'sortable_columns'

Then bundle:

% bundle

Usage¶ ↑

Column Sorter¶ ↑

Just instantiate the ColumnSorter object with the class to be sorted and pass the pertinent parameters to it.

sort = ColumnSorter.new(klass)
sort.column(params[:column])
sort.direction(params[:direction])

Views¶ ↑

Just call the sortable helper:

<%= sortable column_name %>

TODOs¶ ↑

  • This gem has zero testing coverage. SAD TROMBONE

  • ActiveRecord Scope Extension

Copyright © 2012 Brian McNabb. See LICENSE.txt for further details.