Skip to content

Instantly share code, notes, and snippets.

@ColinDKelley
Created April 9, 2010 20:36
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 ColinDKelley/361562 to your computer and use it in GitHub Desktop.
Save ColinDKelley/361562 to your computer and use it in GitHub Desktop.
our user.rb with Hobo Fields
class User < ApplicationModel
fields :null=>false do
first_name :string
last_name :string
time_zone :string
encrypted_password :binary, :limit => 255
last_login_at :datetime, :null=>true
tos_agreed_date :datetime, :null=>true
registered_IP_address :string, :null=>true
contact_country_code :string, :limit => 3, :default => ""
contact_national_number :string, :limit => 12, :default => ""
optimistic_lock
timestamps
end
belongs_to :organization # implicitly indexes foreign key
index [:contact_country_code, :contact_national_number]
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment