Skip to content

Instantly share code, notes, and snippets.

@tcocca
Created March 19, 2010 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcocca/338165 to your computer and use it in GitHub Desktop.
Save tcocca/338165 to your computer and use it in GitHub Desktop.
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