Last active
August 29, 2015 13:58
-
-
Save iamvery/10328874 to your computer and use it in GitHub Desktop.
This file contains 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
# https://github.com/iamvery/rails-api-example/blob/b21a0a918c65892376ccbebaf96057051795afc0/app/controllers/v1/articles_controller.rb | |
module V1 | |
class ArticlesController < ApplicationController | |
def index | |
articles = [ | |
{ id: 123, name: 'The Things' }, | |
] | |
respond_to do |format| | |
format.json do | |
render json: articles | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment