Skip to content

Instantly share code, notes, and snippets.

Created February 27, 2009 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/71263 to your computer and use it in GitHub Desktop.
Save anonymous/71263 to your computer and use it in GitHub Desktop.
class Airmigo
include DataMapper::Resource
property :id, Serial
belongs_to :users
has n, :users
end
# This is a default user class used to activate merb-auth. Feel free to change from a User to
# Some other class, or to remove it altogether. If removed, merb-auth may not work by default.
#
# Don't forget that by default the salted_user mixin is used from merb-more
# You'll need to setup your db as per the salted_user mixin, and you'll need
# To use :password, and :password_confirmation when creating a user
#
# see merb/merb-auth/setup.rb to see how to disable the salted_user mixin
#
# You will need to setup your database and create a user.
class User
include DataMapper::Resource
property :id, Serial
property :updated_at, DateTime
property :login, String, :nullable => false
property :firstname, String
property :lastname, String
has n, :emails
has n, :localairports
belongs_to :airmigos
has n, :airmigos
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment