Created
September 26, 2011 19:23
Revisions
-
Nate Wiger created this gist
Sep 26, 2011 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ class Contact < ActiveRecord::Base col :name, :type => String, :null => false col :contact_type_id, :type => Integer, :null => false col :address, :type => String, :limit => 1000 col :city, :type => String col :state, :type => String, :limit => 40 col :zip, :type => String, :limit => 20 col :phone, :type => String, :limit => 20 col :email, :type => String, :limit => 100 end # in Ruby 1.9 it looks even cleaner: class Contact < ActiveRecord::Base col :name, type: String, null: false col :contact_type_id, type: Integer, null: false col :address, type: String, limit: 1000 col :city, type: String col :state, type: String, limit: 40 col :zip, type: String, limit: 20 col :phone, type: String, limit: 20 col :email, type: String, limit: 100 end