In my terminal I can see there is one big query loading all data for all 3 models and then I have this error:
NoMethodError (undefined method "date" for #<Medium::Medium:0x007f27b9b97a48>
As I understand my def data method is getting data from Medium::Medium model only. How do I fix this to get data from all 3 models as needed, please?
So far I've tried to do as described in associated and nested models section.
I'm trying to implement
has_many / belongs_to
association and at the moment I'm a bit stuck as I can't populate data from 3 models.My models look like this:
then in my Datatables I have this:
and my JS looks like this:
In my terminal I can see there is one big query loading all data for all 3 models and then I have this error:
NoMethodError (undefined method "date" for #<Medium::Medium:0x007f27b9b97a48>
As I understand mydef data
method is getting data fromMedium::Medium
model only. How do I fix this to get data from all 3 models as needed, please? So far I've tried to do as described in associated and nested models section.