Sha256: 3cc245ef944c378923f050764b6cec055a84ce085090e013e7f7e38bf7846779
Contents?: true
Size: 722 Bytes
Versions: 8
Compression:
Stored size: 722 Bytes
Contents
# frozen_string_literal: true module Decidim module Devise # This controller customizes the behaviour of Devise::Invitiable. class InvitationsController < ::Devise::InvitationsController # We don't users to create invitations, so we just redirect them to the # homepage. def authenticate_inviter! redirect_to root_path end # Overwrite the method that returns the path after a user accepts an # invitation. Using the param `invite_redirect` we can redirect the user # to a custom path after it has accepted the invitation. def after_accept_path_for(resource) params[:invite_redirect] || after_sign_in_path_for(resource) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems