0.01
No commit activity in last 3 years
No release in over 3 years
A Rails gem to power the jTable jQuery plugin
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.0.0
 Project Readme

jTable - jQuery Datagrid done right

jTable JS project

jtable-rails RubyGem

jTable.net source

Usage

Basic

class Person < ActiveRecord::Base
  jtable :basic, :first_name, :last_name
end

This creates a jTable called basic with the attributes first_name and last_name.

One-to-One Association

class Person < ActiveRecord::Base
  has_one :place
  
  jtable :one_to_one, :first_name, :last_name, {:place => [:city, :state]}
end

This creates a jTable called one_to_one with the person attributes first_name and last_name, and the place_attributes city and state.

Custom Attributes

class Person < ActiveRecord::Base
  jtable :custom, :first_name, :last_name, :date_of_birth
  
  def jtable_custom_attribute_date_of_birth
    self.date_of_birth.strftime("%m/%d/%Y")
  end
end

This will make the date_of_birth field be displayed with the format mm/dd/yyyy.