Reputation: 672
I have a model with the following associations:
class Car < ActiveRecord::Base
belongs_to :transportation_vehicle
belongs_to :owner
has_many :parts
def scrap(buyer, part)
...
end
end
How would I access owner and parts in the scrap method?
Upvotes: 0
Views: 1172