我在追踪一个语法错误时遇到了很多麻烦,rails 一直告诉我在我的代码中,但对于我的生活,我看不到它!我收到以下错误:
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