sinatra/sinatra-recipes — pull request #91 by nzwsch (2014-03-26 08:00:56+00:00)
Title: Update database/mongo.md

I apologize that bunch of opening issues but I noticed problems. First,

```ruby
get('/collections/?') { settings.mongo_db.collection_names }
```

This returns just a combined string like "system.indexestest". In this commit, I changed and result was

```json
["system.indexes","test"]
```

This is valid JSON. Next, `delete('/remove/:id')` always returns `{:success => true}` however there is not id.

```ruby
if settings.mongo_db['test'].find_one(object_id(params[:id])) # returns BSON or nil
{:success => true}.to_json
else
{:success => false}.to_json
end
```