[Rails] routes and url_for

Abdur-Rahman Advany rails at advany.com
Thu Dec 22 21:38:44 GMT 2005


Hi,

I myself use map.search :controller => 'search', that works for me..

timurv at hitv.ru wrote:
> Hi, All.
>
> I try to relocate controllers. Admin space controlers moved to
> /app/controllers/admin and user space controllers to
> /app/controllers/user
>
> In routes.rb I use
>
>   map.connect 'search', :controller => 'user/search'
>
> that correct I see.
>
> But when I want to use start_form_tag or simply url_for, that used in
> start_form_tag, I do not know how generate url like /search, becouse
> url_tag return url corresponding with routes.rb rules:
>
> /user/search
>
> So, what is the right way to do this?
>
>   



More information about the Rails mailing list