diff options
| author | mo khan <mo@mokhan.ca> | 2014-12-20 18:18:12 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-12-20 18:18:12 -0700 |
| commit | fdfaf54b78626e6baf49b0f99b29d7dd92e39c1e (patch) | |
| tree | bea9389daec34b427141737fe32106555229b41a /app/controllers/api/v1/cakes_controller.rb | |
| parent | a2fb03fccda3f4b1b64e66b9254bb2a8a39bd4ce (diff) | |
install latest delayed job and remove dependence on responders gem.
Diffstat (limited to 'app/controllers/api/v1/cakes_controller.rb')
| -rw-r--r-- | app/controllers/api/v1/cakes_controller.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/app/controllers/api/v1/cakes_controller.rb b/app/controllers/api/v1/cakes_controller.rb index 1f03e8ee..195dcfc7 100644 --- a/app/controllers/api/v1/cakes_controller.rb +++ b/app/controllers/api/v1/cakes_controller.rb @@ -1,14 +1,12 @@ module Api module V1 class CakesController < ApiController - respond_to :json - def index - respond_with(@cakes = current_user.creations) + @cakes = current_user.creations end def show - respond_with(@cake = current_user.creations.find(params[:id])) + @cake = current_user.creations.find(params[:id]) end def create @@ -16,27 +14,26 @@ module Api end def create_cake_succeeded(cake) - respond_with(@cake = cake) + @cake = cake end def create_cake_failed(cake) - respond_with(@cake = cake) + @cake = cake end def update @cake = current_user.creations.find(params[:id]) current_user.tag(@cake, with: params[:cake][:tags], on: :tags) if @cake.update(cake_params.reject { |key, value| key == "tags" }) - respond_with @cake + @cake else - respond_with @cake + @cake end end def destroy @cake = current_user.creations.find(params[:id]) @cake.destroy! - respond_with(@cake) end private |
