fixed a hash bug
This commit is contained in:
parent
3f908acce5
commit
b37f6a326b
2 changed files with 7 additions and 4 deletions
|
@ -213,10 +213,9 @@ module CouchRest
|
|||
myfield = fields
|
||||
while farray.length > 1
|
||||
front = farray.shift
|
||||
myfield[front] = {}
|
||||
myfield[front] ||= {}
|
||||
myfield = myfield[front]
|
||||
end
|
||||
# todo: json
|
||||
fname, fext = farray.shift.split('.')
|
||||
fguts = File.open(file).read
|
||||
if fext == 'json'
|
||||
|
@ -227,7 +226,6 @@ module CouchRest
|
|||
end
|
||||
if File.exists?("#{appdir}/doc.json")
|
||||
default_json = JSON.parse(File.open("#{appdir}/doc.json").read)
|
||||
|
||||
end
|
||||
design = @db.get(docid) rescue {}
|
||||
design.merge!(fields)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue