0
我試圖爲CMS創建一個菜單,並且在它中,您有頂級部分(由不屬於另一部分確定的)具有列表更多部分或navigation_items。嘗試構建菜單的路徑,需要關於多態關聯的一些幫助
我無法全部連接。
我有以下型號:
section.rb:
class Section < ActiveRecord::Base
belongs_to :section, polymorphic: true
has_many :navigation_items
end
navigation_item.rb:
class NavigationItem < ActiveRecord::Base
belongs_to :section
end
我能請得到一些幫助,讓這一切連接,因爲我希望它上班?
什麼是你的題? – DiegoSalazar
'我無法全部連接'。 我認爲這是不言而喻的。 – Thermatix