Skip to content

Instantly share code, notes, and snippets.

@augustoppimenta
Last active August 29, 2015 14:03
Show Gist options
  • Save augustoppimenta/21df0e60e4cb14b9aa4d to your computer and use it in GitHub Desktop.
Save augustoppimenta/21df0e60e4cb14b9aa4d to your computer and use it in GitHub Desktop.
def show
@post = current_manager.post.find(params[:id])
unless @post
flash[:error] = 'Você não permissão para acessar essa página'
redirect_to manager_root_path
end
add_breadcrumb "Post ##{@post.id}", request.url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment