Permalink
Browse files

Some docs

  • Loading branch information...
1 parent e92b451 commit 2ab552d43089dc7789bbf890c199e4dcbc015c4f @willcodeforfoo committed Feb 13, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 app.rb
View
2 app.rb
@@ -74,12 +74,14 @@ def read_template_file(template_path, context)
"OK"
end
+# Display an edit form
get '/admin/:collection/:id/edit' do
@page = $db[params[:collection]].find_one({:_id => BSON::ObjectId(params[:id])})
erb :'admin/edit'
end
+# Admin "dashboard", lists all content for editing
get '/admin' do
collections = $db.collections.reject {|collection| collection.name.match(/(fs|system)\./) }

0 comments on commit 2ab552d

Please sign in to comment.