I ran into this error when I was doing an myarray.include?(:some_symbol)
myarray holds some SimplyStored Documents ... when comparing of those it raises an
undefined method `_id' for :mySymbol:Symbol
/usr/lib/ruby/gems/1.8/gems/simply_stored-0.3.6/lib/simply_stored/instance_methods.rb:11:in `=='
this comes as the equals method (==) does not check whether other is an simply stored object. So any object is asked for its _id-method which of course is not available for objects of foreign classes.
So instead of
def ==(other)
other._id == _id && other._rev == _rev
end
I ran into this error when I was doing an myarray.include?(:some_symbol)
myarray holds some SimplyStored Documents ... when comparing of those it raises an
this comes as the equals method (==) does not check whether other is an simply stored object. So any object is asked for its _id-method which of course is not available for objects of foreign classes.
So instead of
just do
and the problem is solved.