# Routes from restful\_authentication, wtf?

**URL:** <https://www.ruby-forum.com/t/routes-from-restful-authentication-wtf/150656>\
**Category:** Rails\
**Created:** [October 10, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/routes-from-restful-authentication-wtf/150656 "2008-10-10T22:09:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bouldr-matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Post date:** [October 10, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/routes-from-restful-authentication-wtf/150656/1 "2008-10-10T22:09:46Z")

</div>

Hey,

Can someone please explain what these routes from restful\_authentication  
map out to?

I’m trying to move the administrative actions from a RA based login  
system to an admin namespace but thanks to this routing I’m unsure about  
what to move where.

map.resources :users, :member =\> { :enable =\> :put } do |users|  
users.resource :account  
users.resources :roles  
end

Thanks

Matt

---

<div class="post-metadata">

**Author:** ![bouldr-matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Post date:** [October 10, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/routes-from-restful-authentication-wtf/150656/2 "2008-10-10T22:49:02Z")

</div>

That does not look like the routes from restful authentication  
alone… Looks like there is a role base authentication system added  
too…

If you do all the user editing inside the admin space why not just  
wrap this in the admin space?

map.resources :admin do |admin|  
admin.resources :users, :member =\> { :enable =\> :put } do |users|  
users.resource :account  
users.resources :roles  
end  
end

---

<div class="post-metadata">

**Author:** ![bouldr-matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Post date:** [October 11, 2008, 12:16am UTC](https://www.ruby-forum.com/t/routes-from-restful-authentication-wtf/150656/3 "2008-10-11T00:16:58Z")

</div>

Freddy A. wrote:

> That does not look like the routes from restful authentication  
> alone… Looks like there is a role base authentication system added  
> too…

My bad, I forgot to mention I am using the recipies from the RA with  
bells and whistles article I found, including email activation and  
roles.

> If you do all the user editing inside the admin space why not just  
> wrap this in the admin space?
> 
> map.resources :admin do |admin|  
> admin.resources :users, :member =\> { :enable =\> :put } do |users|  
> users.resource :account  
> users.resources :roles  
> end  
> end

That would be a nice way to do it, I think I have come up with pretty  
much the same thing but I have tidied up the paths at the same time.

Thanks for the input, it showed me I haven’t done something really silly  
😃

Thanks

Matt
