lib/saasable/railties/helpers.rb in saasable-5.1.0 vs lib/saasable/railties/helpers.rb in saasable-6.0.0
- old
+ new
@@ -6,15 +6,17 @@
klass.extend ClassMethods
klass.send(:include, InstanceMethods)
klass.class_eval do
helper_method :current_saas
- before_filter :_redirect_if_saas_not_found unless Rails.env.development?
+ before_action :_redirect_if_saas_not_found unless Rails.env.development?
saas_not_found_redirect_to '/404.html'
private
+ def _redirect_if_saas_not_found; end
+
def _skip_saasable
current_saas&.deactivate!
end
end
end
@@ -30,11 +32,11 @@
end
METHOD
end
def skip_saasable(options)
- skip_before_filter :_redirect_if_saas_not_found, options
- before_filter :_skip_saasable, options
+ skip_before_action :_redirect_if_saas_not_found, options.merge(raise: false)
+ before_action :_skip_saasable, options
end
end
module InstanceMethods
def current_saas