Feature #15760

JS response support for #render_error

Added by Zach Hamman over 6 years ago. Updated about 6 years ago.

Status:ReopenedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Category:Code cleanup/refactoring
Target version:Candidate for next major release


In ApplicationController#render_error, responding formats are HTML and REST API. It would helpful if render_error could respond with JS.

Associated revisions

Revision 12855
Added by Jean-Philippe Lang about 6 years ago

Adds JS response support to #render_error (#15760).


#1 Updated by Jean-Philippe Lang over 6 years ago

What kind of response do you expect?

#2 Updated by Zach Hamman about 6 years ago

Recommend an errors.js view in common directory that adds the flash messages to the top of the page similar to a validation error when saving an object. Display the errors with content in that construction in HTML response.

#3 Updated by Jean-Philippe Lang about 6 years ago

  • Subject changed from render_error method for JS format to JS response support for #render_error
  • Category changed from UI to Code cleanup/refactoring
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

Added in r12855. The error is displayed with a simple JS alert().

#4 Updated by Jean-Philippe Lang about 6 years ago

  • Status changed from Closed to Reopened
  • Resolution deleted (Fixed)

#5 Updated by Jean-Philippe Lang about 6 years ago

  • Target version changed from 2.5.0 to Candidate for next major release

Also available in: Atom PDF