Created
March 19, 2010 20:49
-
-
Save tcocca/338165 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 update | |
@page = Page.find(params[:id[) | |
enforce_update_permission(@page) do | |
flash[:error] = "You can only edit your own pages" | |
redirect_to page_path(@page) | |
return | |
end | |
update! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment