Hi Ivan, I inserted now the above mentioned line but I am getting now the following error:
/config/routes.rb:8:in `block in <top (required)>': undefined local variable or method `map' for #<ActionDispatch::Routing::Mapper: 0x3eba8b0> (NameError) is map.connect still available in rails3? On 9 Jan., 06:07, ivanpoval <[email protected]> wrote: > On Jan 7, 7:01 am, Gambo <[email protected]> wrote: > > > > > Thank you! I will have a look at it. > > > On 6 Jan., 17:59, Frederick Cheung <[email protected]> wrote: > > > > On Jan 6, 3:53 pm, Gambo <[email protected]> wrote: > > > > > Hi there, > > > > > i am very new to ror and i want to create a page which does the > > > > following: > > When I have a little, but very important advice for you: try to use > resources and the REST design. > > > > > The user can register(devise) and can specifiy a page name e.g. > > > > jondoe. After this his account is send by email etc. > > > > > Now I want to generate a page which follows the following route: > > > > >www.mydomain.com/jondoe > > There is a very good recipe for this kind of things: Please check > Rails Recipes book [Make Your URLS Meaningful (and Pretty)] > Most likely you will need something like this: > map.connect ':user', :controller => 'users', :action => > 'show', :filter => 'user' > > > > > What I understood is that the ror standard routing goes /controller/ > > > > action but of course I dont have a controller called jondoe. > > > > > I also want to have the router for creating a user or doing something > > > > else via urlwww.mydomain.com/user/edit > > > > > I know this questions could be stupid but I didnt found a way to solve > > > > this issue. Can somebody give me a hint? > > > > Two things: > > > You don't have to stick with the defaults, if you want action/ > > > controller, action/id/controller, randomword/action etc.. then just go > > > ahead. > > > You can also have wildcards in the paths you match, which sounds like > > > what you want > > > The docs for ActionController::Routing (or ActionDispatch::Routing) > > > have plenty of examples. There's also a guide on routing (http:// > > > guides.rubyonrails.org/routing.html) > > > > Fred > > > > > Thanks! -- 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.

