Files
railsgoat/app/controllers/work_info_controller.rb
T
2016-04-19 08:43:18 -04:00

11 lines
270 B
Ruby

class WorkInfoController < ApplicationController
def index
@user = User.find_by_user_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