ryanb/nested_form — Issue #135: Error with simple_form and inherited_resources
Author: greenplastik
Created: 2012-01-26 21:17:55+00:00
State: open

rails 3.1
simple_form 1.5.2
inherited_resources 1.2.2

Have all three set up as per each gem's instructions.

When I do the following:

simple_nested_form_for @record do |form|

or

simple_nested_form_for resource do |form|

I get the following error (from either of the lines above):

undefined method `klass' for nil:NilClass

I've tried overriding the assignment of @record in the RecordsController for the new and edit actions. No joy.

I've confirmed that the @records (or resource) is being assigned correctly, by inspecting it.

Please help.