Skip to content

Instantly share code, notes, and snippets.

@grosser
Forked from josevalim/tasks_controller.rb
Created February 6, 2009 13:20
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 grosser/59394 to your computer and use it in GitHub Desktop.
Save grosser/59394 to your computer and use it in GitHub Desktop.
class TasksController < ApplicationController
make_resourceful do
actions :all
response_for :create_failed do |format|
format.html { redirect_to project_url(@task.project)}
end
end
protected
def load_object
Project.find_by_title!(params[:project_title]).tasks.find(params[:id])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment