73322a0e55
Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
17 lines
412 B
Ruby
17 lines
412 B
Ruby
# frozen_string_literal: true
|
|
|
|
module AcceptsPendingInvitations
|
|
extend ActiveSupport::Concern
|
|
|
|
def accept_pending_invitations
|
|
return unless resource.active_for_authentication?
|
|
|
|
clear_stored_location_for_resource if resource.accept_pending_invitations!.any?
|
|
end
|
|
|
|
def clear_stored_location_for_resource
|
|
session_key = stored_location_key_for(resource)
|
|
|
|
session.delete(session_key)
|
|
end
|
|
end
|