From: Leonard Chin Date: 2007-03-28T09:34:09+09:00 Subject: Re: How Routing Rails? When you just have the lines in route_account.rb, what do you think that "map" refers to? 1. How Kernel#load, Kernel#require work. They do not simply "insert text" from the supplied file. Rather, they will execute (effectively, anyway) 2. What does "map" mean? It needs to be an instance of Action::Controller::Routes, either though a block or a constructor. This is really the wrong list, though. You should try http://groups.google.com/group/rubyonrails-talk for questions like this. On 3/27/07, Yamal Khaled Soueidan wrote: > Hello, > > I'm trying to do develop some modules so I can reuse all my codes in > different projects. > > I need to put routing in different files, and in route.rb include the > files which have my routing code, but I don't know if this would work? > > Example, the following lines is inside route_account.rb. > > map.login 'login', :controller => 'accounts', :action => 'login' > map.login 'signup', :controller => 'accounts', :action => 'signup' > map.logout 'logout', :controller => 'accounts', :action => 'logout' > map.account 'account' :controller => 'accounts', :action => 'account' > > I tried to include the line below in route.rb, but that wouldn't work? > > include 'route_account.rb' > or load 'route_account.rb' or require 'route_account' > > Any help would be appropriated :) and thanks > > Regards, > Jamal > > Thanks for your help! >