We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 675d557 commit d4a9b83Copy full SHA for d4a9b83
1 file changed
app/models/team_location.rb
@@ -44,7 +44,9 @@ class ActiveRecord_Relation < ActiveRecord::Relation
44
has_many :sessions
45
46
has_many :patient_locations,
47
- -> { where(academic_year: it.academic_year) },
+ ->(team_location) do
48
+ where(academic_year: team_location.academic_year)
49
+ end,
50
through: :location
51
52
validate :subteam_belongs_to_team
0 commit comments