diff options
author | ThibG <thib@sitedethib.com> | 2020-02-20 00:52:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 00:52:50 +0100 |
commit | 668098303284b0aa0f1dcfddc280ed1b6fb435bb (patch) | |
tree | d5b47229d14d496ec48a9f7ad303acdcc5054841 /app/controllers | |
parent | 955f838f9df9a6af4ba2ab51716def6093698c28 (diff) | |
parent | bc4de2f66117b5eac8ebe4a389ad9915c471b0c5 (diff) |
Merge pull request #1287 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/accounts_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/auth/registrations_controller.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index c4ee22847..ee48da177 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -9,7 +9,7 @@ class AccountsController < ApplicationController before_action :set_cache_headers before_action :set_body_classes - skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) } + skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) } skip_before_action :require_functional! def show diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index 531df7751..f6a85d87e 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -42,7 +42,6 @@ class Auth::RegistrationsController < Devise::RegistrationsController resource.locale = I18n.locale resource.invite_code = params[:invite_code] if resource.invite_code.blank? - resource.agreement = true resource.current_sign_in_ip = request.remote_ip resource.build_account if resource.account.nil? @@ -50,7 +49,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController def configure_sign_up_params devise_parameter_sanitizer.permit(:sign_up) do |u| - u.permit({ account_attributes: [:username], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code) + u.permit({ account_attributes: [:username], invite_request_attributes: [:text] }, :email, :password, :password_confirmation, :invite_code, :agreement) end end |