app/controllers/application_controller.rb
# Prevent stored_location_for redirecting to a different tenant
Prevent stored_location_for redirecting to a different tenant
Prevent stored_location_for redirecting to a different tenant
def after_sign_in_path_for(resource)
    location = stored_location_for(resource)
    if location && location.starts_with?("/r/#{Apartment::Tenant.current}")
      location
    else
      welcome_index_path
    end
  end
def after_sign_in_path_for ( resource ) location = stored_location_for ( resource ) if location && location . starts_with? ( "/r/#{Apartment::Tenant.current}" ) location else welcome_index_path end end
Prevent stored_location_for redirecting to a different tenant
Prevent stored_location_for redirecting to a different tenant
resource