remove name from devise

This commit is contained in:
Torsten 2023-01-16 20:05:32 +02:00
parent 3447b44299
commit 322631ea53
2 changed files with 0 additions and 11 deletions

View File

@ -1,5 +1,4 @@
class ApplicationController < ActionController::Base
before_action :configure_permitted_parameters, if: :devise_controller?
include Pundit::Authorization
alias :current_user :current_member #for pundit
@ -7,10 +6,6 @@ class ApplicationController < ActionController::Base
protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
end
def user_not_authorized
flash[:alert] = "You are not authorized to perform this action."
redirect_back(fallback_location: root_path)

View File

@ -5,12 +5,6 @@
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" } ,
url: registration_path(resource_name) ) do |f|
= render "devise/shared/error_messages", resource: resource
.mb-4
= f.label :name, class: "block font-bold mb-2 text-gray-700 text-sm"
= f.text_field :name,
autocomplete: "name",
placeholder: "Joona Virtanen",
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline"
.mb-4
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
= f.email_field :email,