Module: CouchRest::Model::Designs::ClassMethods
- Defined in:
- lib/couchrest/model/designs.rb
Instance Method Summary collapse
-
#default_per_page ⇒ Object
The models number of documents to return by default when performing pagination.
-
#design(*args, &block) ⇒ Object
Add views and other design document features to the current model.
-
#paginates_per(val) ⇒ Object
Override the default page pagination value:.
Instance Method Details
#default_per_page ⇒ Object
The models number of documents to return by default when performing pagination. Returns 25 unless explicitly overridden via paginates_per
46 47 48 |
# File 'lib/couchrest/model/designs.rb', line 46 def default_per_page @_default_per_page || 25 end |
#design(*args, &block) ⇒ Object
Add views and other design document features to the current model.
26 27 28 29 30 31 |
# File 'lib/couchrest/model/designs.rb', line 26 def design(*args, &block) mapper = DesignMapper.new(self) mapper.create_view_method(:all) mapper.instance_eval(&block) if block_given? end |