[Nitro] confused about app.dispatcher.root

Jonathan Buch john at oxyliquit.de
Sat Aug 18 04:47:46 EDT 2007


[can't say much about the error, I think we talked on irc about that.]

My uneducated guess would be that the status_500 is either a standard
method on the controller or a template in the proto folder.
Maybe they have just been forgotten, George?

> Then I noticed the blog actually sets app.dispatcher.root to
> its Post *model* class, and the controller is defined at
> Post::Controller.
> So am I doing the wrong thing by setting app.dispatcher.root
> directly to my controller?

When using a model for the .dispatcher.root the controller has to be
`MyModel::Controller`.  The dispatcher will find it automatically
then.  (What it _could_ also do, is make the 'MyModel#link_to()'
work correctly when used...  Could be only my mind, I think though
someone on IRC recently metioned something like this.)

Other than that, passing a controller is perfectly ok here.  (should
be at least, everything else is a bug)


Feel the love

More information about the Nitro-general mailing list