Well I have a bill resource and I want the form of bill resource to be displayed in active admin dashboard.MY code look likes ->
# apps/views/admin/dashboard/_form.html.arb
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
# dashboard.rb
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
But I am getting only black space for this form in dashboard! pls help me out !
Aucun commentaire:
Enregistrer un commentaire