0
I have this relationship
.
How do I consult on ActiveRecord to return data from Works, WorkZei and Wi_schools?
I tried so:
r = Responsible.find(1)
students = r.students
students.each {|s| s.school.joins(:works,:work_zeis).all }
Results in the following error:
NoMethodError: undefined method `joins'
Can you give more details of your problem? it’s easier to help. In your case will really give error, why school is an object and not an Activerecordassociation so it makes no sense you make joins there. ! :)
– Luiz Carvalho