我认为,我的<>严格>方法是错误的。
当我从 或查询, 我发现以下路由错。
Routing Error
No route matches {:action=>"show", :controller=>"resumes"}
http:// localhost:3000/resumes”rel=“nofollow” http:// localhost:3000/resumes/1"rel=“nofollow” 无法确定原因。
Here is my code.
class SubmissionsController < ApplicationController
def create
@resume = Resume.new(params[:resume])
if @resume.save
#UserMailer.created_resume_email(@user).deliver
redirect_to :action => show
format.html { redirect_to(@resume, :notice => Resume was successfully created. ) }
format.xml { render :xml => @resume, :status => :created, :location => @resume }
else
@title = "Create a new resume"
render new
end
end
def show
@resume = Resume.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @resume }
end
end
end
Leaflet::Application.routes.draw do
resources :resumes
match / => resumes#new
end