2016-10-20 36 views
0
flash[:error] = '<u>Error in Wells:</u><br />' + flash[:error] 

我收到此错误闪光灯[:错误] = '<u>错误韦尔斯:</u><br />' +闪光灯[:错误]

AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".): app/controllers/application_controller.rb:70:in `error' 
    app/controllers/application_controller.rb:441:in `block (2 levels) in parse_job_xml_modern' 
    app/controllers/application_controller.rb:115:in `each' 
    app/controllers/application_controller.rb:115:in `block in parse_job_xml_modern' 
    app/controllers/application_controller.rb:92:in `parse_job_xml_modern' 
    app/controllers/jobs_controller.rb:1017:in `block in parse_job_xml' 
    app/controllers/jobs_controller.rb:1012:in `each' 
    app/controllers/jobs_controller.rb:1012:in `parse_job_xml' 
    app/controllers/jobs_controller.rb:760:in `parse' 


    Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.0. 
0/lib/action_dispatch/templates/rescues/_source.erb (3.0ms) 
    Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.0. 
0/lib/action_dispatch/templates/rescues/_trace.html.erb (5.0ms) 
    Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.0. 
0/lib/action_dispatch/templates/rescues/_request_and_response.html.erb (2.0ms) 
    Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.0. 
0/lib/action_dispatch/templates/rescues/_web_console.html.erb (1.0ms) 
    Rendered C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/web-console-2.0. 
0/lib/action_dispatch/templates/rescues/diagnostics.html.erb within rescues/layo 
ut (77.0ms) 
+0

编辑您的问题以包括发生错误的控制器方法。 – MarsAtomic

+0

除非well_xml_parse(upload_job_path)#我们正在别处解析这个(可重用性) \t binding.pry 闪光灯[:错误] = '错误韦尔斯:
' +闪光灯[:错误] \t \t \t返回(错误(“”,upload_job_path)) –

+0

这里的错误是在控制器 –

回答

0

试试这个

flash[:error] = 'Error in Wells:' + flash[:error] 
+0

对不起,我试图不工作 –