remove name from devise
This commit is contained in:
parent
3447b44299
commit
322631ea53
@ -1,5 +1,4 @@
|
|||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
|
||||||
|
|
||||||
include Pundit::Authorization
|
include Pundit::Authorization
|
||||||
alias :current_user :current_member #for pundit
|
alias :current_user :current_member #for pundit
|
||||||
@ -7,10 +6,6 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def configure_permitted_parameters
|
|
||||||
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
|
|
||||||
end
|
|
||||||
|
|
||||||
def user_not_authorized
|
def user_not_authorized
|
||||||
flash[:alert] = "You are not authorized to perform this action."
|
flash[:alert] = "You are not authorized to perform this action."
|
||||||
redirect_back(fallback_location: root_path)
|
redirect_back(fallback_location: root_path)
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" } ,
|
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" } ,
|
||||||
url: registration_path(resource_name) ) do |f|
|
url: registration_path(resource_name) ) do |f|
|
||||||
= render "devise/shared/error_messages", resource: resource
|
= 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
|
.mb-4
|
||||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
= f.email_field :email,
|
= f.email_field :email,
|
||||||
|
Loading…
Reference in New Issue
Block a user