On Wed, Mar 17, 2010 at 4:34 PM, Stefan Buhr <li...@ruby-forum.com> wrote:

> Conrad Taylor wrote:
> >
> > namespace :admin do resources :settings end
> >
> > Then, you'll end up with the following controllers:
> >
> > /admin/settings
>
> Hey,
>
> thanks for the hint, but resources() only adds the standard actions to
> the route (index, show, edit, new, create, update, delete). I'm looking
> for a more generic approach using default routes for many controllers
> and actions in one namespace.
>

Yes, this is correct unless you had another question because it wasn't
clear from the original e-mail.  If you would like to add non-standard
action(s)
to a controller, then you'll need to do the following:

namespace :admin do resources :settings do
get :some_action, :on => :member # member route
get :some_other_action, :on => :collection # collection route
end end

Good luck,

-Conrad



> --
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> 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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to