Created
April 9, 2010 20:36
-
-
Save ColinDKelley/361562 to your computer and use it in GitHub Desktop.
our user.rb with Hobo Fields
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 characters
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