0
我在Rails 3的模型一個簡單的問題: 下面是我的模型:Rails 3 - 如何訪問belongs_to/has_many關係中的父級屬性?
class Order < ActiveRecord::Base
attr_accessible :customer :date #blahblah..
has_many :items
accepts_nested_attributes_for :items
class Item < ActiveRecord::Base
belongs_to :order
那麼,如何才能在我的程序達到@item.customer
?
感謝