Permalink
Browse files

Using get on reservations/create

  • Loading branch information...
winton committed Sep 16, 2011
1 parent 21f904f commit d2958648e2622faec06c5685b551ae6e5576f4e4
Showing with 5 additions and 21 deletions.
  1. +1 −1 README.md
  2. +4 −20 lib/maitre_d/controller/reservations.rb
View
@@ -16,7 +16,7 @@ Now your environment is ready to run `passenger start` on the application (or wh
/reservations/create
--------------------
-### Post
+### Get
{ seconds: 3600, environment: 'beta', user: 'me' }
@@ -1,12 +1,8 @@
Application.class_eval do
-
- # /reservations/create
- # post: { seconds: 3600, environment: 'beta', user: 'winton' }
- # return:
- # { status: 'reserved', expires: 'TIME', user: 'tung' }
-
- post '/reservations/create' do
+ get '/reservations/create' do
+ puts '@@@'
+ puts params.inspect
reservation = Reservation.find(params)
create =
@@ -18,23 +14,11 @@
reservation.to_response
end
- # /reservations/show
-
- # post: { environment: 'beta' }
- # return:
- # { status: 'available' }
- # { status: 'reserved', expires: 'TIME', user: 'tung' }
-
get '/reservations/show' do
+ puts '!!!'
Reservation.find(params).to_response
end
- # /reservations/destroy
-
- # get: { environment: 'beta' }
- # return:
- # { status: 'reserved', expires: 'TIME', user: 'tung' }
-
get '/reservations/destroy' do
reservation = Reservation.find(params)
reservation.destroy

0 comments on commit d295864

Please sign in to comment.