-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Is it possible to use searchable in custom Active Admin page?
If yes, how to do it?
All the docs examples is using the normal page like this ActiveAdmin.register "Model Here"
.
If I try to register custom page, searchable_select won't work in this form 🤔
ActiveAdmin.register_page 'Product' do
page_action :create_product, method: :post do
end
content do
confirm_submit = 'return confirm("Do you really want to create this product?")'
form_for :data, url: admin_product_create_product_path, html: { onsubmit: confirm_submit }, method: :post do |f|
# 1. This doesnt work.
f.input(:additional_category,
as: :searchable_select,
ajax: { resource: Product })
# 2. This doesnt work either.
# f.input(:product_id,
# as: :searchable_select,
# ajax: { resource: Brand, collection_name: :products })
end
end
Metadata
Metadata
Assignees
Labels
No labels