Browse Source

docs: clarify comments

CLDC-4273-update-rails-version
Nat Dean-Lewis 4 days ago
parent
commit
ff4753e8c4
  1. 4
      app/controllers/users_controller.rb
  2. 2
      config/application.rb

4
app/controllers/users_controller.rb

@ -11,10 +11,6 @@ class UsersController < ApplicationController
before_action -> { filter_manager.serialize_filters_to_session }, if: :current_user, only: %i[index]
def index
# CSV requests fall through to the respond_to block below, which returns 401
# for non-support users. Only HTML non-support users are redirected. The
# redirect must `return`: Rails 8 raises DoubleRenderError if the action then
# also renders/heads (previously the later render silently won).
return redirect_to users_organisation_path(current_user.organisation) unless current_user.support? || request.format.csv?
all_users = User.visible.sorted_by_organisation_and_role

2
config/application.rb

@ -20,7 +20,7 @@ Bundler.require(*Rails.groups)
module DataCollector
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
# Initialize configuration defaults for this Rails version.
config.load_defaults 8.1
# Please, add to the `ignore` list any other `lib` subdirectories that do

Loading…
Cancel
Save