Install devise invitable
Devise invitable gem is required to invite users.
This commit is contained in:
parent
a20c1bb882
commit
04c3859526
11 changed files with 171 additions and 3 deletions
|
|
@ -9,6 +9,8 @@ class ApplicationController < ActionController::Base
|
|||
# Ensure every controller authorizes resource or skips authorization (skip_authorization_check)
|
||||
check_authorization unless: :devise_controller?
|
||||
|
||||
before_action :devise_configure_permitted_parameters, if: :devise_controller?
|
||||
|
||||
def store_location
|
||||
# store last url - this is needed for post-login redirect to whatever the user last visited.
|
||||
return unless request.get?
|
||||
|
|
@ -65,4 +67,8 @@ class ApplicationController < ActionController::Base
|
|||
def not_found
|
||||
raise ActionController::RoutingError.new('Not Found')
|
||||
end
|
||||
|
||||
def devise_configure_permitted_parameters
|
||||
devise_parameter_sanitizer.permit(:accept_invitation, keys: [:username])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue