Skip to content

Commit

Permalink
Merge pull request #89 from amco/86_better_documentation
Browse files Browse the repository at this point in the history
Improve documentation
  • Loading branch information
seancookr committed Dec 11, 2015
2 parents 14fbdbe + 7fc34b8 commit 9602fbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ This will not replace de default find view.
```ruby
class User < Dolly::Document
database_name 'db'
set_design_doc 'dolly' #defaults to 'dolly'
property :name, :surname, :address
property :date_of_birth, class_name: Date, default: Date.today
Expand All @@ -71,8 +70,9 @@ User.all #Dolly::Collection #<#User...>, <#User...>
user = User.find "a1b2d3e" #<#User...>
user.name
#Return a User object based on the custom view.
user = User.view 'view_name', {key: ["a", "b", "c"], reduce: true}
#Return a User object based on the custom view. `include_docs` is always true for this method.
response = User.view '_design/<design_document_name>/_view/<view_name>', {key: <key>, reduce: true}
user = User.new.from_json response


# Save doc
Expand Down

0 comments on commit 9602fbf

Please sign in to comment.