Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

problem with polymorphic association nested in namespaced parents.

#8

Hi,

my environment and code related with the problem are here: http://gist.github.com/263390

and i get this error:

Can't get singleton resource from class Catalog. You have have probably done something like:

nested_in :catalog, :singleton => true # <= where this is the first nested_in

You should tell resources_controller how to find the singleton resource like this:

nested_in :catalog, :singleton => true do

Catalog.find(<.. your find args here ..>)

end

Or:
nested_in :catalog, :singleton => true, :find => <.. method name or lambda ..>

Or, you may be relying on the route to load the resource, in which case you need to give RC some
help. Do this by mapping the route segment to a resource in the controller, or a parent or mixin

map_enclosing_resource :catalog, :segment => ..., :singleton => true <.. as above ..>

can you drive me to a solution for polymorphic associations nested in namespaced parents please?

Reported by airy · December 24th, 2009 @ 10:25 PM

State: new
Milestone: none
Assigned to: Ian White Ian White

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.