flash[:error] = '<u>Error in Wells:</u><br />' + flash[:error]
我收到此错误
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 :(得分:0)
试试这个
flash[:error] = 'Error in Wells:' + flash[:error]