ruby on rails - rescue RecordNotFound in Activeadmin -


how can rescue activerecord::recordnotfound in activeadmin resources?

i know in rails can put rescue_from(activerecord::recordnotfound) in applicationcontroller, there equivalent way of doing in activeadmin?

activeadmin.register foobar   controller     rescue_from activerecord::recordnotfound, with: :show_errors     def show_errors       # ...     end   end end 

edit: can @ 1 place resources:

require 'active_admin/base_controller' activeadmin::basecontroller.class_eval   rescue_from activerecord::recordnotfound, with: :show_errors   def show_errors     # ...   end end 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -