Please help to understand how to do @project.payments
having this tree:
Project
|__Stages
|__Costs
|__Payments
project.rb
has_many :stages
has_many :costs, :through => stages
stage.rb
belongs_to :project
has_many :costs
has_many :payments :through => costs
cost.rb
belongs_to :stage
has_many :payments
payment.rb
belongs_to :cost