1
我想寫我在哪裏尋找獲取與模型獲取與模型關聯嵌套的屬性
對於如
class Category < ActiveRecord::Base
accepts_nested_attributes_for :devices, :books
#other association and code is not written here
end
相關的嵌套屬性的更清潔的方式測試案例之一我預計
$ Category.get_nested_attributes #this is a dummy method
$ ["devices","books"] #this is the return i expect
是否有任何已有的幫助方法?如果是,請讓我知道。 :)
感謝
你救了我的時間,謝謝。正是我需要的。 – AnkitG 2013-03-26 09:52:58