Created
November 14, 2018 15:26
-
-
Save hpjaj/4f8bec20774337a96dade75dfd8ca720 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/posts_controller.rb | |
module API | |
class PostsController < ApplicationController | |
def index | |
posts = ['Post 1', 'Post 2'] | |
render json: { posts: posts } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment