2012-02-13 16 views
0

最初のルートに 'rake routes'の最初に '/ app'が含まれていないのはどうですか?私はそれをしたい場合Railsルーティングの問題 - 一貫性のないパスが生成されました

scope :path => "/app" do 
    namespace :admin do 
    resources :work_appointments, :shallow => true do 
     get :edit_from_scratch 
     get :autocomplete_client_first, :on => :collection 
     get :cancel, :on => :collection 
     get :new_form, :on => :collection 
     get :client, :on => :collection 
    end 
    end 
end 

==

rake routes => 
admin_work_appointment_work_appointment_edit_from_scratch GET /admin/work_appointments/:work_appointment_id/edit_from_scratch(.:format) {:action=>"edit_from_scratch", :controller=>"admin/work_appointments"} 
autocomplete_client_first_admin_work_appointments GET /app/admin/work_appointments/autocomplete_client_first(.:format)   {:action=>"autocomplete_client_first", :controller=>"admin/work_appointments"} 
cancel_admin_work_appointments GET /app/admin/work_appointments/cancel(.:format)        {:action=>"cancel", :controller=>"admin/work_appointments"} 
new_form_admin_work_appointments GET /app/admin/work_appointments/new_form(.:format)       {:action=>"new_form", :controller=>"admin/work_appointments"} 
client_admin_work_appointments GET /app/admin/work_appointments/client(.:format)        {:action=>"client", :controller=>"admin/work_appointments"} 
admin_work_appointments GET /app/admin/work_appointments(.:format)         {:action=>"index", :controller=>"admin/work_appointments"} 
POST /app/admin/work_appointments(.:format)         {:action=>"create", :controller=>"admin/work_appointments"} 
new_admin_work_appointment GET /app/admin/work_appointments/new(.:format)        {:action=>"new", :controller=>"admin/work_appointments"} 

答えて

0

:shallow => trueオプション

+0

しかし、何を削除しますか? – 99miles

関連する問題