From fa43458ce04cfacdad7797010dddc13fc9598560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20Ara=C3=BAjo?= Date: Thu, 24 Mar 2022 14:16:06 -0300 Subject: [PATCH] Update posts_controller.rb --- app/controllers/api/v1/posts_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/api/v1/posts_controller.rb b/app/controllers/api/v1/posts_controller.rb index 69993a8..f7ac88b 100644 --- a/app/controllers/api/v1/posts_controller.rb +++ b/app/controllers/api/v1/posts_controller.rb @@ -16,6 +16,11 @@ def show render json: @post end + # GET /api/v1/posts/1 + def show_v2 + render json: @post + end + # POST /api/v1/posts def create @post = Post.new(post_params)