Created
July 3, 2014 03:55
-
-
Save cthornton/fc956cff37712fefbbd1 to your computer and use it in GitHub Desktop.
Blog
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 update | |
@post = current_user.posts.find(params[:id]) | |
@post.update_attributes!(params[:post]) | |
end | |
def create | |
@post = current_user.posts.create!(params[:post]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment