Open mrudult opened 1 year ago
Given the following custom page:
ActiveAdmin.register_page "Invite Account" do content do active_admin_form_for :invitation, url: invite_account_admin_accounts_path, method: :post do |f| f.inputs do f.input :first_name, label: 'First name', required: true f.input :last_name, label: 'Last name' f.input :email, label: 'Email', required: true f.input :post_id, as: :search_select, url: proc { admin_posts_path }, fields: [:post_name], display_name: "post_name", order_by: "post_name_asc" end f.actions do f.action :submit, label: 'Submit' end end end end
Throws error:
ActionView::Template::Error (blank object given): 1: # frozen_string_literal: true 2: insert_tag active_admin_application.view_factory["page"] app/admin/pages/invite_account.rb:8:in block (4 levels) in <main>' app/admin/pages/invite_account.rb:4:inblock (3 levels) in ' app/admin/pages/invite_account.rb:3:in `block (2 levels) in '
ActionView::Template::Error (blank object given): 1: # frozen_string_literal: true 2: insert_tag active_admin_application.view_factory["page"]
app/admin/pages/invite_account.rb:8:in block (4 levels) in <main>' app/admin/pages/invite_account.rb:4:inblock (3 levels) in ' app/admin/pages/invite_account.rb:3:in `block (2 levels) in '
block (4 levels) in <main>' app/admin/pages/invite_account.rb:4:in
The search_select_filter works fine. Any help will be appreciated.
search_select_filter
@mrudult you may want pass @object (@invitation || resource) rather :invitation below: active_admin_form_for :invitation
active_admin_form_for :invitation
Given the following custom page:
Throws error:
The
search_select_filter
works fine. Any help will be appreciated.