Class: Decidim::Conferences::ConferenceProgramMeetingsByDay

Inherits:
Rectify::Query
  • Object
show all
Defined in:
decidim-conferences/app/queries/decidim/conferences/conference_program_meetings_by_day.rb

Overview

This query class filters meetings for component and day

Instance Method Summary collapse

Constructor Details

#initialize(component, day, user = nil) ⇒ ConferenceProgramMeetingsByDay

Returns a new instance of ConferenceProgramMeetingsByDay.


7
8
9
10
11
# File 'decidim-conferences/app/queries/decidim/conferences/conference_program_meetings_by_day.rb', line 7

def initialize(component, day, user = nil)
  @component = component
  @day = day
  @user = user
end

Instance Method Details

#queryObject


13
14
15
16
17
# File 'decidim-conferences/app/queries/decidim/conferences/conference_program_meetings_by_day.rb', line 13

def query
  Rectify::Query.merge(
    ConferenceProgramMeetings.new(@component, @user)
  ).query.where(start_time: @day.beginning_of_day..@day.end_of_day).order(start_time: :asc)
end