I make a solution that work fine to me, but i have to create one for each
controller:

# clients
map.admin_clients '/admin/clients/:action/:id', :controller =>
'/admin/clients'

...



2009/12/7 Paulo Coutinho <pa...@prsolucoes.com>

> Hum. Ok.
>
> The last solution doesn't work, so i think that i'll have to make a route
> to each controller :(
>
> Do you make one route by controller? Can you post an example about how i
> can redirect all from "admin/clients" to correct controller/action/id ?
>
>
>
>
> 2009/12/7 Kristian Hellquist <kristian.hellqu...@gmail.com>
>
>> > But my system is an ERP, i have more than 20 controllers.
>>
>> >
>> > I have to make it for all controllers and actions?
>>
>> I have an application with something like 20 controllers and make all
>> routes explicit for each controller.
>>
>> >
>> > My actions is in portuguese, not "edit" but "alterar"... i put here an
>> > example of my structure.
>> >
>> > Dont have other method? A route that redirect all with "admin/" to
>> > "admin/:controller/:action/:id" ???
>> >
>>
>> You could probably do
>>
>> map.with_options(:namespace => "admin") do |admin|
>>  admin.connect ':controller/:action/:id'
>> end
>>
>> --
>>
>> 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 rubyonrails-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>>
>
>
> --
> Atenciosamente,
> Paulo Coutinho.
> Blog: www.prsolucoes.com/blog
> Site: www.prsolucoes.com
> Msn:  pa...@prsolucoes.com
>



-- 
Atenciosamente,
Paulo Coutinho.
Blog: www.prsolucoes.com/blog
Site: www.prsolucoes.com
Msn:  pa...@prsolucoes.com

--

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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to