couchrest_model/lib/couchrest/model/support/hash.rb

10 lines
303 B
Ruby
Raw Normal View History

2010-06-21 13:58:19 +02:00
# 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