Skip to content

Instantly share code, notes, and snippets.

@zmack
Created September 2, 2010 21:56
Show Gist options
  • Save zmack/563025 to your computer and use it in GitHub Desktop.
Save zmack/563025 to your computer and use it in GitHub Desktop.
before do
require_role :member
@project = Project.find(params[:project_id])
end
get :show, map: "/projects/:project_id/tasks/:id" do
@task = Task.find(params[:id])
raise Sinatra::NotFound unless @project && @task
render "tasks/show"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment