diff --git a/README.md b/README.md index 5a189d9..e67d9ea 100644 --- a/README.md +++ b/README.md @@ -395,7 +395,7 @@ linkarooie/ ## Gather Script -[GRABIT.SH](https://grabit.sh) was inspired by this script. +- [GRABIT.SH](https://grabit.sh) was inspired by this script. The `gather.sh` script is a utility for collecting project information: diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index c28410a..a6f6967 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -59,18 +59,18 @@ def update protected def configure_permitted_parameters - devise_parameter_sanitizer.permit(:sign_up, keys: [:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description]) - devise_parameter_sanitizer.permit(:account_update, keys: [:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description]) + devise_parameter_sanitizer.permit(:sign_up, keys: [:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description, :banner_enabled]) + devise_parameter_sanitizer.permit(:account_update, keys: [:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description, :banner_enabled]) end def sign_up_params - params.require(:user).permit(:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description).tap do |user_params| + params.require(:user).permit(:email, :password, :password_confirmation, :username, :full_name, :tags, :avatar, :banner, :description, :banner_enabled).tap do |user_params| user_params[:tags] = user_params[:tags].split(',').map(&:strip).to_json if user_params[:tags].present? end end def account_update_params - params.require(:user).permit(:email, :password, :password_confirmation, :current_password, :username, :full_name, :tags, :avatar, :banner, :description, :public_analytics).tap do |user_params| + params.require(:user).permit(:email, :password, :password_confirmation, :current_password, :username, :full_name, :tags, :avatar, :banner, :description, :banner_enabled, :public_analytics).tap do |user_params| user_params[:tags] = user_params[:tags].split(',').map(&:strip).to_json if user_params[:tags].present? end end diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 2c3853f..e25531c 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -33,6 +33,11 @@ <%= f.text_field :banner, class: 'w-full p-1 rounded text-black' %> +