Correct the visibility of a few routes
This commit is contained in:
parent
a38937cadb
commit
8bd3837b54
5 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
|
|||
before_action :set_locale, :redirect_to_maintenance
|
||||
protect_from_forgery
|
||||
|
||||
private
|
||||
def redirect_to_maintenance
|
||||
if Houdini.maintenance&.active && !current_user
|
||||
unless self.class == Users::SessionsController &&
|
||||
|
|
|
@ -8,6 +8,7 @@ module Controllers::Locale
|
|||
included do
|
||||
before_action :set_locale
|
||||
|
||||
private
|
||||
def set_locale
|
||||
if params[:locale] && Houdini.intl.available_locales.include?(params[:locale])
|
||||
I18n.locale = params[:locale]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
module Controllers::Nonprofit::Current
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
private
|
||||
def current_nonprofit
|
||||
@nonprofit = current_nonprofit_without_exception
|
||||
raise ActionController::RoutingError, 'Nonprofit not found' if @nonprofit.nil?
|
||||
|
|
|
@ -6,6 +6,7 @@ module Controllers::Supporter::Current
|
|||
include Controllers::Nonprofit::Current
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
private
|
||||
def current_supporter
|
||||
current_nonprofit.supporters.find(params[:supporter_id] || params[:id])
|
||||
end
|
||||
|
|
|
@ -29,6 +29,7 @@ module Nonprofits
|
|||
)
|
||||
end
|
||||
|
||||
private
|
||||
def required_params
|
||||
params.require(:nonprofit_id, card: [:name, :stripe_card_token, :stripe_card_id, :holder_id, :holder_type])
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue