How to render another resource's form in active admin dashboard - Rails?
好吧,我有一个账单资源,我希望账单资源的形式显示在活动管理仪表板中。我的代码看起来像 ->
应用程序/视图/管理员/仪表板/_form.html.arb
1 2 3 4 5 6 7 8 | 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 |
仪表盘.rb
1 2 3 4 5 6 | 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 |
但是我在仪表板中只有这个表单的黑色空间!
请帮帮我!
尝试用
替换渲染线