Adding configuration support and changing 'couchrest-type' key to 'model' along with config options
This commit is contained in:
parent
5c21de8586
commit
85cd1308bc
14 changed files with 157 additions and 17 deletions
|
@ -31,7 +31,7 @@ module CouchRest
|
|||
"views" => {
|
||||
'all' => {
|
||||
'map' => "function(doc) {
|
||||
if (doc['couchrest-type'] == '#{self.to_s}') {
|
||||
if (doc['#{self.model_type_key}'] == '#{self.to_s}') {
|
||||
emit(doc['_id'],1);
|
||||
}
|
||||
}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue