I am attempting to debug some complicated inline templates, because they are generated dynamically with the complicated way this program works.
However when doing render inline: “Template here” rescue false, an error is still thrown if there’s an error in the Template.
I tried this in IRB and it’s very weird!
ActionView::Template.new(“Test <% if Crash %>”, “inline template”, handler, :locals => {}).render(“Test2”,{}) rescue false
This returns an error, even though we would expect the Rescue to rescue us from the bad code in the inline template. This worked in an old version of Rails.
Any ideas?
Breaking out into multiple lines also didn’t help
begin
ActionView::Template.new(“Test <% if Crash %>”, “inline template”, handler, :locals => {}).render(“Test2”,{})
rescue
false
end
Still has an error.
=Ryan