Class: Hash

Inherits:
Object show all
Defined in:
lib/couchrest/support/rails.rb

Overview

This file contains various hacks for Rails compatibility. To use, just require in environment.rb, like so:

require 'couchrest/support/rails'

Direct Known Subclasses

CouchRest::Response

Class Method Summary collapse

Class Method Details

.===(other) ⇒ Object

Hack so that CouchRest::Document, which descends from Hash, doesn’t appear to Rails routing as a Hash of options



9
10
11
12
# File 'lib/couchrest/support/rails.rb', line 9

def self.===(other)
  return false if self == Hash && other.is_a?(CouchRest::Document)
  super
end