Files
railsgoat/app/controllers/work_info_controller.rb
robbiepaul 298610b5f6
CI / test (3.4.1) (push) Has been cancelled
Initial commit (history cleared)
2026-04-29 11:21:39 +01:00

12 lines
296 B
Ruby

# frozen_string_literal: true
class WorkInfoController < ApplicationController
def index
@user = User.find_by(id: params[:user_id])
if !(@user) || @user.admin
flash[:error] = "Sorry, no user with that user id exists"
redirect_to home_dashboard_index_path
end
end
end