I changed my show controller to find records by their permalink rather than their id (for SEO juiciness).
def show
@project = Project.find_by_permalink(params[:id])
end
But, if I type in localhost:3000/projects/foo (and there is not a project with a foo permalink) I get a 500 server error instead of a 404 not found.
Why is this, and how can I fix it?