Skip to content

Instantly share code, notes, and snippets.

@adjohu
Created January 13, 2012 12:17
Show Gist options
  • Save adjohu/1605822 to your computer and use it in GitHub Desktop.
Save adjohu/1605822 to your computer and use it in GitHub Desktop.
class User
include DataMapper::Resource
# property <name>, <type>
property :id, Serial
property :username, String, :unique => true
property :email, String, :unique => true
def find_by_id(id)
get(id)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment