= CouchRestAdapter

This is a realy early version.

This project rocks and uses MIT-LICENSE.

== Requirements

* Rails > 4
* Couchrest
* Requires config/database.yml file


== Instalation

=== In Gemfile

    gem 'couch_rest_adapter'
    
=== Sample config/database.yml

    defaults: &defaults
      host: localhost
      port: 5984
      protocol: http

    development:
      <<: *defaults
      name: db

    test:
      <<: *defaults
      name: db_test


=== Model Declaration


  class User < CouchRestAdpater::Base
    use_default_database
  end
  
=== TODO

* Allow setting new attributes with ```model.attribute = value```
* More test coverage
* Add tasks for pushing design documents
* Add support for basic database http auth.

= CouchRestAdapter

This is a realy early version.

This project rocks and uses MIT-LICENSE.

== Requirements

* Rails > 4
* Couchrest
* Requires config/database.yml file


== Instalation

=== In Gemfile

    gem 'couch_rest_adapter'
    
=== Sample config/database.yml

    defaults: &defaults
      host: localhost
      port: 5984
      protocol: http

    development:
      <<: *defaults
      name: db

    test:
      <<: *defaults
      name: db_test


=== CouchViews

In order for ```Model.all``` to workyou need to add a view like (code in cs):

    (d) ->
      split_id = d._id.split('/')
      t = split_id[0]
      emit t, d
      
We are planning to add a rake task that setup this view on install.

=== Model Declaration


  class User < CouchRestAdpater::Base
    use_default_database
  end
  
=== TODO

* Allow setting new attributes with ```model.attribute = value```
* More test coverage
* Add tasks for pushing design documents
* Add support for basic database http auth.

Add sample all couch view
Add sample all couch view