Hi All,
I've 3 models A has_many B, B has_many C; B has_one A, C has_one B
In a template file I can get all C models/instances. But I only can address the attributes of C, I can't get Attributes of the B instance with which A has a has_one relationship.
The only way I see is to have a method in C model:
public function getNameofB() {
return B::get()->get_ByID($this->BID)->Name
}
But is there another way of doing this. ?
Thanks