# Member on has\_one or has\_many

**URL:** <https://www.ruby-forum.com/t/member-on-has-one-or-has-many/156543>\
**Category:** Rails\
**Created:** [December 29, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/member-on-has-one-or-has-many/156543 "2008-12-29T19:55:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freddy\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@Freddy\_A](https://www.ruby-forum.com/u/Freddy_A)\
**Post date:** [December 29, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/member-on-has-one-or-has-many/156543/1 "2008-12-29T19:55:12Z")

</div>

Hi,

I was wondering if it is possible todo something like this in the  
routes file:

map.namespace(:admin) do |admin|  
admin.resources :dashboard, :only =\> [:index],  
:has\_one =\> :something, :member =\> [:action =\> :get],  
:has\_many =\> [:something\_else ,:more\_something]  
end

The problem is the member in the has\_one declaration, the member is  
added to the dashboard and not the something controller. I tried  
wrapping in [] and {} but no luck…

I got it working using :dashboard do BUT I would like to have the  
nice :has\_one :has\_many…

Anyone?

PS I guess If I want to use :only and :except for the has\_one this  
also applies…
