Class: Decidim::Meetings::MeetingLink
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Meetings::MeetingLink
- Includes:
- HasComponent
- Defined in:
- app/models/decidim/meetings/meeting_link.rb
Class Method Summary collapse
-
.find_meetings(component:) ⇒ Object
Finds all the meetings linked to the given component filtering out meetings that belong to private not transparent spaces.
Class Method Details
.find_meetings(component:) ⇒ Object
Finds all the meetings linked to the given component filtering out meetings that belong to private not transparent spaces.
13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/decidim/meetings/meeting_link.rb', line 13 def self.find_meetings(component:) meetings = Meeting .joins(:meeting_links) .where("decidim_meetings_meeting_links.component": component) .filter do |meeting| !meeting.component.private_non_transparent_space? end Meeting.where(id: meetings.map(&:id)) end |