Class: ActionView::Template
- Inherits:
-
Object
- Object
- ActionView::Template
- Defined in:
- lib/expose_model/action_view.rb
Overview
raise a 404, not a 500 if we first access the exposed method in a view
Instance Method Summary collapse
Instance Method Details
#render_template(view, local_assigns = {}) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/expose_model/action_view.rb', line 5 def render_template(view, local_assigns = {}) render(view, local_assigns) rescue Exception => e view.response.status = 404 if e.is_a?(ActiveRecord::RecordNotFound) raise e end |