fix for integer check

This commit is contained in:
Kyle Drake 2024-02-02 14:34:55 -06:00
parent 4f3ca20f55
commit 2f2025aa31

View file

@ -21,7 +21,7 @@ get '/site/:username/?' do |username|
@page = 1 if @page == 0
if params[:event_id]
not_found unless params[:event_id].is_integer?
not_found unless params[:event_id].to_i > 0
event = Event.select(:id).where(id: params[:event_id]).first
not_found if event.nil?
events_dataset = Event.where(id: params[:event_id]).paginate(1, 1)