-1
我想提供編輯和查看活動管理員用戶的顯示面板中的鏈接,其中有來自abc模型的數據。當我點擊視圖鏈接時,它會在「abc」模型中搜索當前用戶標識。我想要它搜索與特定用戶相關的abc模型ID。 關係:abc has_many用戶。show panel link_to in active admin
如何提供路徑? 任何幫助將是明顯的
show do
attributes_table do
rows :id, :name, :email
end
panel "abc" do
table_for (user.abc) do |a|
column :model
column :registration_number
column do link_to "View", admin_abc_path end
column do link_to "Edit", edit_admin_abc_path end
end
end
end
謝謝..我做了類似的事情,爲我工作列do | p | link_to「查看」,admin_abc_path(p.id)結束 – Pbms