doing just:
map.namespace :admin do |admin|
admin.resources :categories, :controller=>"categories"
end
gives me two routes:
/admin/categories
/categories
both are hitting the right controllers, but once im on the admin-index-view,
all other links are still prefixed with admin. o well
On Thu, Oct 21, 2010 at 2:37 PM, tom <[email protected]> wrote:
>
> yes, was looking at the same, but that is rails3 if im not wrong.
>
> ill keep digging
>
> thx
>
>
> On Thu, Oct 21, 2010 at 2:21 PM, Luis Saffie <[email protected]> wrote:
>
>> Looking at the documentation more closely, you could do something like
>> this in your routes
>>
>> namespace "admin" do
>> resources :categories
>> end
>>
>> This will give you /admin/categories in the way you want.
>>
>> http://guides.rubyonrails.org/routing.html
>>
>>
>> Luis
>> --
>>
>> http://www.saffie.ca
>>
>> --
>> Posted via http://www.ruby-forum.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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<rubyonrails-talk%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>
--
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.