Skip to content

Instantly share code, notes, and snippets.

@cthornton
Last active August 29, 2015 14:03
Show Gist options
  • Save cthornton/af09f018bc3b347a5b6c to your computer and use it in GitHub Desktop.
Save cthornton/af09f018bc3b347a5b6c to your computer and use it in GitHub Desktop.
Blog
class PostsController < ApiController
def create
@post = current_user.posts.create!(params.require(:post))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment