Created
October 14, 2015 07:14
-
-
Save amykangweb/c4c2b00a23580d77e838 to your computer and use it in GitHub Desktop.
Controller Patch Method
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
def published | |
@post.update(published: true) | |
redirect_to :back, notice: "This post has been published!" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment