Sha256: 0beb673e4bbb96220529432b8e61bd231f8be8cefa550a0e200ee3c20e864ebd

Contents?: true

Size: 848 Bytes

Versions: 1

Compression:

Stored size: 848 Bytes

Contents

= Will Paginate for Couchrest

Adds support for the will_paginate gem by mislav to {couchrest}[http://github.com/couchrest/couchrest].

Inspired by Kenneth Kalmer's post:

http://www.opensourcery.co.za/2010/02/08/paginating-documents-with-couchrest-and-will_paginate/

Automatically generate views with an extra reduce method used to generate the total number of documents.

== Install

  gem install will_paginate_couchrest
  
== Usage

  require 'rubygems'
  require 'couchrest'
  require 'will_paginate'
  require 'will_paginate_couchrest'

  class User < CouchRest::ExtendedDocument
    
    property :nickname

    paginated_view_by :nickname

  end

  @users = User.paginate_by_nickname :page => 1, :per_page => 10, :key => 'Fred'

  will_paginate @users


== Copyright

Copyright (c) 2010 Sam Lown @ autofiscal S.L. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
will_paginate_couchrest-0.1.0 README.rdoc