Commit graph

8 commits

Author SHA1 Message Date
Brian Candler d672d5f8d4 Move design_doc_* attributes into DesignDoc mixin 2009-03-31 10:58:05 -07:00
Brian Candler 159a761ad9 Tidy up initialisations of design_doc which are no longer needed 2009-03-31 10:57:33 -07:00
Matt Aimonetti 661daac473 fixed an inheritance problem with ExtendedDocument subclasses 2009-03-27 11:11:49 -07:00
Brian Candler ec7848b783 Multiple database support for ExtendedDocument.
New optional parameters are available to select the database:

Mixins::DocumentQueries
  * get <id>, <db>
  * all :database => <db>
  * first :database => <db>

Mixins::Views
  * view <name>, :database => <db>
  * all_design_doc_versions <db>
  * cleanup_design_docs! <db>

Mixins::DesignDoc
  * refresh_design_doc now only updates the design_doc _id and removes _rev
  * call save_design_doc to save and update the design_doc
  * call save_design_doc_on <db> to save the design doc on a given
    database without modifying the model's design_doc object

Design (core/design.rb)
  * new method view_on <db>, ...

Bug fixes:
  * design_doc_slug in mixins/design_doc.rb was using an empty document
    to calculate the slug each time
  * method_missing in core/extended_document.rb now passes a block through
2009-03-27 11:27:37 +00:00
Brian Candler ada5b1660f Move design_doc attributes to Mixins::DesignDoc 2009-03-26 21:21:20 +00:00
Matt Aimonetti 3e6dba7b66 fixed a bug with ExtendedDocument not declaring any views and trying to use #all or #first 2009-03-03 16:57:59 -08:00
Matt Aimonetti 2f8caa8740 added a new validator 2009-02-20 15:34:49 -08:00
Matt Aimonetti d6665e55ca Started on the ExtendedDocument class with features moved to mixins.
Properties got added, they define getters, setters and aliases.
They will also be the base of the new validation system.
2009-01-29 18:45:01 -08:00