On Sep 20, 9:57 pm, "Commander Johnson" <
commanderjohn...@gmail.com>
wrote:
> I experimented with this line in routes.rb:
> map.root :controller => :forms
>
> instead of
>
> map.root :controller => "forms"
>
> That caused the 500 error.
> Now that last statement is valid, but doesn't work. How do I make the root
> path '/' point to Backend::FormsController?
>
> When I log in as admin, I get the error:
>
> undefined method `form_path' for #<ActionView::Base:0x76ec1a>
>
> How do I make the *_path method understand what namespace we're in?
>
> CmdJohnson
You'll need to point to the path of the controller. So for your
Backend::FormsController, the root route should be set as:
map.root :controller => "backend/forms"
Since Backend::FormsController resides on backend/forms.rb
Also, the path and url helpers for your namespaced controllers are now
named backend_{controller}_path. You can confirm this - and check out
all the other routes, as well - by running:
rake routes