Commit e8617c1e0a4e55560ed125e172b0430811037395
1 parent
6c86b2a8
Exists in
master
and in
29 other branches
Don't rescue from arbitrary exceptions
This makes it really hard to debug if there are problems other than not finding the given template
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -314,7 +314,11 @@ module ApplicationHelper |
314 | 314 | |
315 | 315 | def render_profile_actions klass |
316 | 316 | name = klass.to_s.underscore |
317 | - render "blocks/profile_info_actions/#{name}" rescue render_profile_actions klass.superclass | |
317 | + begin | |
318 | + render "blocks/profile_info_actions/#{name}" | |
319 | + rescue ActionView::MissingTemplate | |
320 | + render_profile_actions klass.superclass | |
321 | + end | |
318 | 322 | end |
319 | 323 | |
320 | 324 | def user | ... | ... |