mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
fix for integer check
This commit is contained in:
parent
4f3ca20f55
commit
2f2025aa31
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue