programs.speakers is fixed
This commit is contained in:
parent
aeded80a11
commit
90edc648f8
1 changed files with 2 additions and 1 deletions
|
|
@ -42,7 +42,8 @@ class Program < ActiveRecord::Base
|
||||||
has_many :event_schedules, through: :events
|
has_many :event_schedules, through: :events
|
||||||
|
|
||||||
has_many :event_users, through: :events
|
has_many :event_users, through: :events
|
||||||
has_many :speakers, -> { distinct }, through: :event_users, source: :user do
|
has_many :program_events_speakers, -> {where(event_role: 'speaker')},through: :events, source: :event_users
|
||||||
|
has_many :speakers, -> { distinct }, through: :program_events_speakers, source: :user do
|
||||||
def confirmed
|
def confirmed
|
||||||
joins(:events).where(events: { state: :confirmed })
|
joins(:events).where(events: { state: :confirmed })
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue