I have a cartridge
and dosing_edge
models such that they have the relationships has_many and belongs_to respectively. By doing that I can call:
@cartridge.dosing_edges
to retrieve all dosing_edges that belong to a cartridge. And that works, but cartridge model also has a dosing_edges attribute. How do I distinguish between method and attribute.
I mean, if I want to access @cartridge.dosing_edges
not to call method .dosing_edges
to retrieve all dosing_edges.
Or should I rename my dosing_edges attribute to be different.
give different name to your
has_many
association.I think this will work for you.