Everything is in the title. I’m used to writing “raise ActiveRecord::RecordNotFound” to raise a 404 but I hope there is a more generic (and ORM agnostic) way of doing this. Thanks.
Everything is in the title. I’m used to writing raise ActiveRecord::RecordNotFound to raise a
Share
you can render with status 404; by default I believe this will still execute the current actions view
if you want your public/404.html file to render try
see also http://rails.rubyonrails.org/classes/ActionController/Base.html#M000464 ‘rendering a file’