Created
December 17, 2010 21:36
-
-
Save brianhempel/745746 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 Person | |
include MongoMapper::Document | |
end | |
class Registree < Person | |
key :in_wels, Boolean | |
key :in_vienna, Boolean | |
end | |
class Visitor < Registree | |
# QUERY = { "$or" => [{:in_wels => true}, {:in_vienna => true}] } | |
def self.query(options={}) | |
super.tap do |query| | |
query["$or"] = [{:in_wels => true}, {:in_vienna => true}] | |
end | |
end | |
def self.name | |
"Registree" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment