Skip to content

Commit

Permalink
Protect 'set_college' function
Browse files Browse the repository at this point in the history
  • Loading branch information
Janell-Huyck committed Nov 20, 2023
1 parent 699391a commit 7fbf7e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/colleges_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def destroy

# Use callbacks to share common setup or constraints between actions.
def set_college
@college = College.find(params[:id])
@college = College.find_by(id: params[:id])
end

# Never trust parameters from the scary internet, only allow the white list through.
Expand Down

0 comments on commit 7fbf7e5

Please sign in to comment.