Sha256: 0a933070abf877c23c912eb55645f3f752b6fe4a59e69f816dc1547a112b75b8
Contents?: true
Size: 404 Bytes
Versions: 36
Compression:
Stored size: 404 Bytes
Contents
require 'exceptions' module ExceptionHelper extend ActiveSupport::Concern included do include Exceptions rescue_from Exceptions::OxenStandardError, with: :system_error end private def system_error err flash[:alert] = "Fejl (%s): %s" % [ err.class.to_s, err.message] redirect_to (request.referrer || root_path) end end ApplicationController.send :include, ExceptionHelper
Version data entries
36 entries across 36 versions & 1 rubygems