Skip to content

Instantly share code, notes, and snippets.

@mgreenly
Created May 19, 2011 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgreenly/979890 to your computer and use it in GitHub Desktop.
Save mgreenly/979890 to your computer and use it in GitHub Desktop.
# undefine the class if it's defined
Object.send(:remove_const, :OrderExample) rescue nil
# define the class
class OrderExample < DataTable
set_model Order
column :id
column :order_number
joins :customer do
column :first_name
end
column :memo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment