Sprankelprachtig aan/afmeldsysteem

dashboard_controller.rb 530B

12345678910111213
  1. class DashboardController < ApplicationController
  2. before_action :require_login!
  3. def home
  4. @user_organized = current_person.participants.includes(:activity).where(is_organizer: true)
  5. @need_response = current_person.participants.includes(:activity).where(attending: nil)
  6. @upcoming = current_person.activities.where('start > ?', DateTime.now).includes(:participants)
  7. @upcoming = current_person.participants
  8. .includes(:activity).joins(:activity)
  9. .where("activities.start >= ?", DateTime.now)
  10. end
  11. end