Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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