peritor / simply_stored

A convenience wrapper around CouchDB (using CouchPotato) that supports relations and S3 attachments
Other
140 stars 16 forks source link

duplicate property names cause mystifying error message #4

Closed kolosy closed 13 years ago

kolosy commented 14 years ago

this is more of a usability thing. i accidentally defined a property and a belongs_to with the same name. the resulting error message was 'undefined method `options' for #CouchPotato::Persistence::SimpleProperty:0x17e581f9'

maybe this makes sense to seasoned ruby-ists, but it threw me off for a bit.

roidrage commented 14 years ago

It doesn't make sense of course, and would be nicer if it'd be caught upfront. I'll look into it. It maybe a case that needs fixing in CouchPotato though, the underlying layer, but I'll be sure to at raise an error or something when a different propery with the same name is already defined.

roidrage commented 13 years ago

Fixed with 85afcada352cfb8d4ece4446b484c63370da3a24