Skip to content

Instantly share code, notes, and snippets.

@cthornton
Last active August 29, 2015 14:03
Show Gist options
  • Save cthornton/b7f50c4c1b0fb3175c4c to your computer and use it in GitHub Desktop.
Save cthornton/b7f50c4c1b0fb3175c4c to your computer and use it in GitHub Desktop.
Blog: Inheriting From Posts Controller
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