mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
cancelled event management on front page
Cancelled event (nb_total_places = -1) are not prompted anymore on the homepage >> no need to push them to the final user. They are still display in the event module for continuity
This commit is contained in:
parent
37bdfcb96f
commit
3e2e5f5972
@ -18,8 +18,10 @@ class API::EventsController < API::ApiController
|
||||
def upcoming
|
||||
limit = params[:limit]
|
||||
@events = Event.includes(:event_image, :event_files, :availability, :category)
|
||||
.where('events.nb_total_places != -1 OR events.nb_total_places IS NULL')
|
||||
.where('availabilities.start_at >= ?', Time.now)
|
||||
.order('availabilities.start_at ASC').references(:availabilities).limit(limit)
|
||||
.order('availabilities.start_at ASC').references(:availabilities)
|
||||
.limit(limit)
|
||||
end
|
||||
|
||||
def show
|
||||
|
Loading…
Reference in New Issue
Block a user