event list for teacher page

This commit is contained in:
Torsten
2023-10-12 13:20:48 +03:00
parent 1290749bce
commit b3063a3238
5 changed files with 29 additions and 3 deletions

View File

@ -8,6 +8,9 @@ class ProfilesController < ApplicationController
end
def show
@events = Event.where(profile_id: @profile.id).
where("start_date > ? " , Date.today - 3.days).
order(:start_date)
end
def new