Hi Tom,

The polymorphic model has a reflection defined like this:

  belongs_to :parent, :polymorphic => true

And if you use auto_actions_for :parent I think it cannot guess the
name of the other class, since it's polymorphic and there are
multiple possible classes (with the ":as =>" defined)

Hobo throws this error:

/vendor/plugins/hobo/hobo/lib/hobo/model_router.rb:176:in
owner_routes':NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name

I'm not sure how this should be solved..



On Mon, Dec 01, 2008 at 04:41:08PM +0000, Tom Locke wrote:
> 
> > currently it is not possible to do that with auto_actions_for, which
> > has to be specified in comments_controller eg as:
> > auto_actions_for :parent
> 
> Can't you do something like
> 
> auto_actions_for :target
> 
> Where:
> 
> class Comments
> 
>    belongs_to :target ...
> 
> end
> 
> Doesn't work?
> 
> Tom
> 
> 
-- 
Christoph Blank
http://tachium.at | http://textmode.at

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to