Skip to content

Instantly share code, notes, and snippets.

@jeffsaracco
Created November 1, 2013 15:32
Show Gist options
  • Save jeffsaracco/7267186 to your computer and use it in GitHub Desktop.
Save jeffsaracco/7267186 to your computer and use it in GitHub Desktop.
ActiveAdmin has_many nested form
form(:html => { :multipart => true }) do |f|
f.inputs 'Main name' do
f.input :name
end
f.inputs "Other sub-piece" do
f.input :other_field_from_main_thing
f.has_many :other_things do |thing|
thing.inputs "things" do
thing.input :thing_1
thing.input :thing_2
end
end
end
f.buttons
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment