Follow Along as I Stumble on the Path to Learning RoR

Tables

Creating Sortable Bootstrap Tables

I found a great article on sorting bootstrap tables without any gems or additional libraries.  Check it out here.


Switching from jQGrid to Data Tables

Was finding using jQGrid was becoming way more complicated than it should be. Moved to data tables, which also runs on jQuery. For me, what was nice was that someone did a tutorial on how to integrate it with Twitter Bootstrap (which I was already using) to make it look good as well. If you don’t use Twitter Bootstrap, you can also use the jQuery UI roller to make a style and color scheme to make the table look nice.

Data tables included the functionality I needed – search and pagination and all I had to do was point the javascript to my html table code. Simple.

http://datatables.net/blog/Twitter_Bootstrap


Pricing Table

I needed help in creating a pricing table, and I found my answer on codrops:

http://tympanus.net/codrops/2010/05/03/pimp-your-tables-with-css3/

Great examples and options for creating a pricing table for your app.


jqGrid

resources for using jqgrid with Rails
http://www.2dconcept.com/jquery-grid-rails-plugin

 

 

formatters available for jqgrid (use to format the data showing in jqgrid)
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:predefined_formatter


CSV Export

One gem to use to allow users to export table data, like reports, is FasterCSV.  The only thing is that there isn’t a lot of documentation on it.  Here is a great tutorial on it:

http://rubyglasses.blogspot.com/2009/07/csv-views-with-fastercsv-and-csvbuilder.html

The only minor issue I ran into was that I needed to add this line:
@output_encoding = ‘UTF-8’

under the format.csv part, like so:

format.csv do
@output_encoding = ‘UTF-8’
end