Skip to content

Instantly share code, notes, and snippets.

@trek
Forked from ignu/gist:274868
Created January 12, 2010 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trek/274878 to your computer and use it in GitHub Desktop.
Save trek/274878 to your computer and use it in GitHub Desktop.
class NamedEntity
def self.inherited(subclass)
subclass.include DataMapper::Resource
subclass.property :id, Serial
subclass.property :name, String
end
end
class Goal < NamedEntity
has n, :targeting_goals
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment