Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User
- include DataMapper::Resource
- # Attributes
- property :id, Serial
- property :login, String
- property :email, String
- property :description, Text
- property :image, String
- property :created_at, DateTime
- property :updated_at, DateTime
- # Associations
- has n, :categories, :through => Resource
- # Validations
- validates_present :login, :password, :password_confirmation
- validates_is_unique :login
- end
Add Comment
Please, Sign In to add comment