Sha256: 61f93965aa1e42f01a9a47fa58a88c68213492942ca92a1c2b8179b0f2df5ecc
Contents?: true
Size: 600 Bytes
Versions: 13
Compression:
Stored size: 600 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery respond_to :html # NotFound errors will be redirected to the action not_found while any other will be redirected to the action generic. rescue_from ApiClient::Exceptions::NotFound, :with => :not_found rescue_from ApiClient::Exceptions::Generic, :with => :generic # This code is only for example purposes. # Any behavior can be executed here. Just write your own. def not_found ApplicationMailer.send_not_found_notice.deliver end def generic ApplicationMailer.send_generic_error.deliver end end
Version data entries
13 entries across 13 versions & 1 rubygems