Forum: Ruby on Rails member on has_one or has_many

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4c438a80fc30661ad619ea177cf9cbd0?d=identicon&s=25 Freddy Andersen (Guest)
on 2008-12-29 19:55
(Received via mailing list)
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...
This topic is locked and can not be replied to.