Sprankelprachtig aan/afmeldsysteem

dashboard_controller.rb 565B

12345678910111213141516171819202122
  1. class DashboardController < ApplicationController
  2. before_action :require_login!
  3. def home
  4. @user_organized = current_person
  5. .participants
  6. .joins(:activity)
  7. .where(is_organizer: true)
  8. .order('activities.start ASC')
  9. @need_response = current_person
  10. .participants
  11. .joins(:activity)
  12. .where(attending: nil)
  13. .order('activities.start ASC')
  14. @upcoming = current_person
  15. .participants
  16. .joins(:activity)
  17. .where('activities.start >= ?', DateTime.now)
  18. .order('activities.start ASC')
  19. end
  20. end