Why is map.root not calling action to set vars...?

Hi All,

I've got a small problem with map.root in the following code:

     map.root :controller => "site_manager", :action => :index

It would appear that, for whatever reason, it isn't calling the
"index" action on my controller and my "@sites" var isn't getting set
for the view. It simply throws a "nil object" error. In the short
term I've solved it with "@sites ||= Site.find(:all)" inside the
view. Howevever, I'd like to know why it might be failing in the
first place. Thoughts?

It is noteworthy that when I manually navigate to "/sitemanager" or "/
site_manager" everything works fine. It simply appears to be a
map.root issue.

Best

Have you deleted the index.html file under the public folder?

Hi All,

I've got a small problem with map.root in the following code:

map\.root :controller => "site\_manager", :action => :index

Try removing the :action =>:index specification (ie just spec the
controller), or use "index" instead of :index. I don't know why these
would fix it but I have seen suggestions that they may.

Colin

Yeah I deleted the "index" page. From the error it goes beyond that.

Wow! That appears to have fixed it. I *know* I tried that before.
Oh well, thanks!