Autoload SyntaxErrorInTemplate
When a SyntaxError is detected in a template we raise this exception. On a first request to the server the exception we get a NameError since the exception is not required from `active_view/template/error.rb` yet. However later on it gets required and a second request will succeed. On the first request we see the rails "Something Wen Wrong" page and not the expected syntax error in template error page with the webconsole and stacktrace. By autoloading the constant we fix this issue. Co-authored-by: Gannon McGibbon <gannon.mcgibbon@gmail.com>
This commit is contained in:
parent
aae270de9e
commit
99e52ae7b1
|
@ -1,3 +1,7 @@
|
||||||
|
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
|
||||||
|
|
||||||
|
*Guilherme Mansur*, *Gannon McGibbon*
|
||||||
|
|
||||||
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`
|
* `RenderingHelper` supports rendering objects that `respond_to?` `:render_in`
|
||||||
|
|
||||||
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
*Joel Hawksley*, *Natasha Umer*, *Aaron Patterson*, *Shawn Allen*, *Emily Plummer*, *Diana Mounter*, *John Hawthorn*, *Nathan Herald*, *Zaid Zawaideh*, *Zach Ahn*
|
||||||
|
|
|
@ -77,6 +77,7 @@ module ActionView
|
||||||
autoload :ActionViewError
|
autoload :ActionViewError
|
||||||
autoload :EncodingError
|
autoload :EncodingError
|
||||||
autoload :TemplateError
|
autoload :TemplateError
|
||||||
|
autoload :SyntaxErrorInTemplate
|
||||||
autoload :WrongEncodingError
|
autoload :WrongEncodingError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue