From 0e8f59c16fcb21301c736ecbc4424cb4c5388c42 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 29 Feb 2016 19:42:08 +0100 Subject: Refactoring Grape API methods into normal controllers & other things --- app/controllers/api/salmon_controller.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/controllers/api/salmon_controller.rb (limited to 'app/controllers/api/salmon_controller.rb') diff --git a/app/controllers/api/salmon_controller.rb b/app/controllers/api/salmon_controller.rb new file mode 100644 index 000000000..99ec15bff --- /dev/null +++ b/app/controllers/api/salmon_controller.rb @@ -0,0 +1,14 @@ +class Api::SalmonController < ApplicationController + before_action :set_account + + def update + ProcessInteractionService.new.(request.body.read, @account) + render nothing: true, status: 201 + end + + private + + def set_account + @account = Account.find(params[:id]) + end +end -- cgit