Ask for Help
Exceptions thrown in Rails views get wrapped by
ActionView::TemplateErrorwhich makes rescuing specific exceptions hard
It’s probably best to prepare all your data in your controller or models and not in the view, which will obviate this and other problems.