I have two models with following associations:
class Panel < ActiveRecord::Base
belongs_to :survey
end
class Survey < ActiveRecord::Base
has_one :panel
end
And I'm using active_admin to manage surveys:
ActiveAdmin.register Survey do
config.per_page = 20
actions :index, :edit, :update
index do
column 'Survey ID' do |s|
s.id
actions defaults: true
end
form do |f|
inputs do
input :id, input_html: { disabled: true }
end
f.actions
end
end
And now I want to add a field to form to have possibility to change survey panel. I read through all documentation of active_admin but didn't find any similar case... Is this possible to do with ActiveAdmin?