Topic: Routes prefix and controller

  map.resource :admin do |admin|
    admin.resources :pages, :member => { :higher => :put, :lower => :put }, :controller => 'admin/pages', :prefix => 'admin_'
    admin.resources :galleries, :controller => 'admin/galleries', :name_prefix => 'admin_'
    # etc
  end
  map.resources :pages

I need to repeat :prefix and :controller many times. I could use .with_options to get rid of prefix. But how could i get rid of :controller?

Using Rails Edge.

Last edited by innu (2007-09-06 10:48:42)