[Nitro] confused about app.dispatcher.root

Bill Kelly billk at cts.com
Thu Aug 16 15:08:31 EDT 2007

Hi again,

I'm encountering an error trying to fetch the index page on
my site.  Essentially I have:

class StoreController < Nitro::Controller

  def index
    @time = Time.now
    redirect 'catalog'

  # ...


app = Application.new
app.dispatcher.root = StoreController

...the error I'm getting is:

DEBUG: Rendering '/status_500'
ERROR: Error while handling StoreController#index(status_500)
ERROR: wrong number of arguments (1 for 0)

But when I looked at the blog and hello examples in the repository,
neither of their index methods accepted any arguments.

Then I noticed the blog actually sets app.dispatcher.root to
its Post *model* class, and the controller is defined at

So am I doing the wrong thing by setting app.dispatcher.root
directly to my controller?



More information about the Nitro-general mailing list