Created
December 13, 2009 10:50
-
-
Save neaf/255380 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class Project | |
| include MongoMapper::Document | |
| key :name, String | |
| key :budget, Integer | |
| key :details | |
| def type | |
| details.class.to_s.gsub("Project", "") | |
| end | |
| end | |
| class DesignProject | |
| include MongoMapper::EmbeddedDocument | |
| end | |
| class MarkupProject | |
| include MongoMapper::EmbeddedDocument | |
| end | |
| class ApplicationProject | |
| include MongoMapper::EmbeddedDocument | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment