peritor / simply_stored

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

Association classname? #1

Closed tvongaza closed 14 years ago

tvongaza commented 14 years ago

Is there any way to have more then on association point to another simply stored item?

IE can we do the following:

class Document
  include SimplyStored::Couch

  belongs_to :creator, :classname => "User"
  belongs_to :updater, :classname => "User"

end
jweiss commented 14 years ago

now, currently not. But it shouldn't be too hard to implement it. Currently everything uses the singular form of the belongs_to as the Class.

It would be great if you could submit a patch.

peritor commented 14 years ago

I've just merged some patches that allow you to just do that.