Created
April 11, 2016 00:57
-
-
Save hugodias/b520d3545ae335d8b7831ab3de1aa251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # app/controllers/api/v1/posts_controller.rb | |
| module Api::V1 | |
| class PostsController < ApiController | |
| before_action :set_post, only: [:show] | |
| respond_to :json | |
| def show | |
| end | |
| private | |
| def set_post | |
| @post = Post.find(params[:id]) | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment