[英]How to render another resource's form in active admin dashboard - Rails?
好吧,我有一個賬單資源,我希望賬單資源的形式顯示在活動的管理儀表板中。我的代碼看起來像 - >
active_admin_form_for bill do |f|
f.semantic_errors *f.object.errors.keys
inputs 'Enter the bill details' do
input :amount
input :is_paid
actions
end
end
ActiveAdmin.register_page "Dashboard" do
menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }
content title: proc{ I18n.t("active_admin.dashboard") } do
form render 'form'
end
end
但是我在儀表板上只獲得了這個表單的黑色空間! 請幫幫我!
嘗試使用render partial: 'form'
替換渲染線render partial: 'form'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.