Class CouchRest::Model::Design
In: lib/couchrest/model/design.rb
Parent: ::CouchRest::Design

Methods

Included Modules

::CouchRest::Model::Designs::Migrations

Attributes

auto_update  [RW]  Can this design save itself to the database? If false, the design will be loaded automatically before a view is executed.
method_name  [RW]  The model Class that this design belongs to and method name
model  [RW]  The model Class that this design belongs to and method name

Public Class methods

Instantiate a new design document for this model

Protected Class methods

Public Instance methods

FILTER HANDLING ########

Add the specified view to the design doc the definition was made in and create quick access methods in the model.

Override the default uri method for one that accepts the current database. This is used by the caching code.

Create a new view object. This overrides the normal CouchRest Design view method

Helper method to provide a list of all the views

Protected Instance methods

Calculate and update the checksum of the Design document. Used for ensuring the latest version has been sent to the database.

This will generate a flatterned, ordered array of all the elements of the design document, convert to string then generate an MD5 Hash. This should result in a consisitent Hash accross all platforms.

[Validate]