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 On Sat, Sep 20, 2008 at 3:45 PM, Commander Johnson < [EMAIL PROTECTED]> wrote: > > Uh oh. > > 500 Internal Server Error > Because I already have a Controller named AdminController, I used the > namespace Backend. > I organized the files like you said in your first post. Every Controller and > every Helper now looks like this: > class Backend::AdminController < ApplicationController > Any ideas? > > On Sat, Sep 20, 2008 at 2:23 PM, Erol Fornoles <[EMAIL PROTECTED] > wrote: > > > > On Sep 20, 8:02 pm, "Commander Johnson" <[EMAIL PROTECTED]> > > wrote: > > > Hi, > > > I've built the Admin section of my project first, and would like to move > > > it > > > to its own Admin namespace. > > > > > > I have four resources: Form, Element, Admin and User. > > > > > > Old URL would be: > > > > > > localhost:3000/forms > > > > > > New URL would be: > > > > > > localhost:3000/admin/forms > > > > > > How do I migrate from one namespace to another? > > > > > > After moving I want to create a second FormsController in the default > > > namespace. > > > I would then script/generate controller and script/generate view and > > > modify > > > as needed. > > > > > > Looking forward to hear your thoughts about this. > > > > > > CmdJohnson > > > > Create a folder named "admin" in the following directories: > > > > - app/controllers > > - app/helpers > > - app/views > > > > Move the controllers, helpers and views which are to be namespaced to > > the corresponding admin subdirectory. > > > > You will need to edit the controllers that are namespaced. For > > example: > > > > Before: class FormsController < ApplicationController > > After: class Admin::FormsController < ApplicationController > > > > And do the same with your namespaced helpers. > > > > Lastly, modify your routes.rb to reflect the namespaced resources: > > > > map.namespace :admin do |admin| > > admin.resources :forms > > admin.resources :elements > > ... > > end > > > > HTH > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

