Forum: Ruby on Rails member on has_one or has_many

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Freddy A. (Guest)
on 2008-12-29 20:55
(Received via mailing list)

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 ]

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...


PS I guess If I want to use :only and :except for the has_one this
also applies...
This topic is locked and can not be replied to.