Created
August 31, 2010 06:12
-
-
Save johnnygoodman/558619 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
testclasses.rb | |
class Expense | |
include MongoMapper::Document | |
key :expense_id, ObjectId | |
key :amount, Float #FloatToDecimalPrecision | |
key :date, Time | |
key :notes, String | |
key :tags, Array # => company | |
key :type, String | |
end | |
class ExpenseCubicle | |
extend Cubicle::Aggregation | |
dimensions :tags, :expression=>'tags[0]' | |
#dimensions :tags, :expression=>'tags.first' #=> also failed | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment