Created
June 23, 2011 00:03
-
-
Save lxcodes/1041594 to your computer and use it in GitHub Desktop.
User Model
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 | |
include DataMapper::Resource | |
timestamps :at | |
property :id, Serial | |
property :first_name, String, :required => true | |
property :last_name, String, :required => true | |
property :company, String | |
property :title, String | |
property :city, String | |
property :country, String | |
property :mobile_number, Float | |
property :email_address, String, | |
:required => true, :format => :email_address, :unique => true, | |
:messages => { | |
:presence => 'We need your email address.', | |
:is_unique => 'We already have that email.', | |
:format => 'Doesn\'t look like an email address to me ...' | |
} | |
property :shahash, String, :required => true | |
property :isAttending, Boolean | |
property :isRegistered, Boolean | |
belongs_to :event | |
has n, :entries, :required => false, :constraint => :destroy | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment