Created
December 6, 2009 10:16
-
-
Save sausheong/250144 to your computer and use it in GitHub Desktop.
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
DataMapper.setup(:default, ENV['DATABASE_URL'] || 'mysql://root:root@localhost/snip') | |
class Url | |
include DataMapper::Resource | |
property :id, Serial | |
property :original, String, :length => 255 | |
property :created_at, DateTime | |
def snipped() self.id.to_s(36) end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment