couchrest_model/lib/couchrest/model/support/hash.rb
2010-06-21 13:58:19 +02:00

9 lines
303 B
Ruby

# This file contains various hacks for Rails compatibility.
class Hash
# Hack so that CouchRest::Document, which descends from Hash,
# doesn't appear to Rails routing as a Hash of options
def self.===(other)
return false if self == Hash && other.is_a?(CouchRest::Document)
super
end
end