I have 2 models. Report and Server that have a belongs_to and has_many relationship. I created an accessor method using delegate that
Report
Server
delegate
Server.where(company_id: 5).first.reports