Project to test ActiveAdmin with Nested Model Forms
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib/tasks
public
script
test
vendor/plugins
.gitignore
Gemfile
Gemfile.lock
README
Rakefile
config.ru

README

== Welcome

This project is to test ActiveAdmin with Nested Model Forms ala RailsCast 196 and 197.

I'm trying to answer these questions:

1.  In the form, I would like to use Formtastic's hidden but that fails

	form do |f|
		f.inputs "Survey" do
         		f.input :name
		end
	
		f.inputs "Courses" do		
			f.fields_for :questions do |qf|
				qf.hidden :_destroy
				qf.input :contents
				qf.input :position
			end
		end

		f.buttons
	end

But, it fails to render with the error:
undefined method `hidden' for #<ActiveAdmin::FormBuilder:0x007f8eb5494c88>

2.  In the same form, if I change fields_for block to

	qf.input :_destroy
	qf.input :contents

Only the contents field is displayed.  It seems that the input method is not appending correctly for the nested form?

3.  Is there a way to Ambre methods from the Form DSL?

If I add 

	div :id => 'blah'

before the f.buttons, the render fails with 
undefined method `div' for #<ActiveAdmin::DSL:0x007f8bc78e7128>