我遇到了很多麻煩跟蹤語法錯誤,軌道一直告訴我在我的代碼中,但對於我的生活我看不到它! 我得到以下錯誤:語法錯誤軌道渲染
syntax error, unexpected keyword_ensure, expecting end-of-input
在該行render :action => "modal", :layout => false
,並不管我做什麼,我不能擺脫它!請幫幫我!
def new
@appointment = Appointment.new
@appointment.patient = current_patient
@appointment.practice = current_practice
respond_to do |format|
if params[:layout] == 'modal'
render :action => "modal", :layout => false
else
format.html
format.json { render json: @appointment }
end
end
end
能否請您提供堆棧跟蹤的副本? –
我假設你的意思是'if params [:layout] =='modal'' not'='。 – lurker
mbratch對不起沒有區別 – mattclar