Last active
August 29, 2015 14:03
-
-
Save cthornton/b7f50c4c1b0fb3175c4c to your computer and use it in GitHub Desktop.
Blog: Inheriting From Posts Controller
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
class PostsController < ApiController | |
def index | |
@posts = current_user.posts | |
render json: @posts.to_json | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment