add api v1 procedure controller

This commit is contained in:
Tanguy PATTE 2015-12-21 17:51:49 +01:00
parent e40e1299ad
commit f474c8e8e1
7 changed files with 137 additions and 0 deletions

View file

@ -0,0 +1,12 @@
class API::V1::ProceduresController < APIController
def show
@procedure = current_administrateur.procedures.find(params[:id]).decorate
render json: @procedure
rescue ActiveRecord::RecordNotFound => e
Rails.logger.error(e.message)
render json: {}, status: 404
end
end