mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-28 19:16:23 +00:00
17 lines
326 B
Ruby
17 lines
326 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Gestiona las excepciones que lanzamos desde los controladores
|
||
|
module ExceptionHandler
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
class SiteNotFound < StandardError; end
|
||
|
|
||
|
included do
|
||
|
rescue_from SiteNotFound, with: :site_not_found
|
||
|
end
|
||
|
|
||
|
def site_not_found
|
||
|
redirect_to sites_path
|
||
|
end
|
||
|
end
|