我創建一個簡單的CMS和Rails 3.我routes.rb
文件我有以下的條目來捕獲所有路線:Rails3中路由優先級
match '*url', :controller => 'site', :action => 'dynamic_page'
我使用ckeditor
寶石的編輯器支持。我rake routes
如下:
root /(.:format) {:action=>"index", :controller=>"site"}
/*url(.:format) {:action=>"dynamic_page", :controller=>"site"}
ckeditor_pictures GET /ckeditor/pictures(.:format) {:action=>"index", :controller=>"ckeditor/pictures"}
ckeditor_pictures POST /ckeditor/pictures(.:format) {:action=>"create", :controller=>"ckeditor/pictures"}
ckeditor_picture DELETE /ckeditor/pictures/:id(.:format) {:action=>"destroy", :controller=>"ckeditor/pictures"}
ckeditor_attachment_files GET /ckeditor/attachment_files(.:format) {:action=>"index", :controller=>"ckeditor/attachment_files"}
ckeditor_attachment_files POST /ckeditor/attachment_files(.:format) {:action=>"create", :controller=>"ckeditor/attachment_files"}
ckeditor_attachment_file DELETE /ckeditor/attachment_files/:id(.:format) {:action=>"destroy", :controller=>"ckeditor/attachment_files"}
我的問題是,你可以看到:
/*url(.:format) {:action=>"dynamic_page", :controller=>"site"}
..loads的CKEditor的路線之前,因此CKEditor的路線不工作。有人可以幫我加載ckeditor路線之前:
/*url(.:format) {:action=>"dynamic_page", :controller=>"site"}
在此先感謝。
嗨@Richard,感謝您的答案的解決方案,但問題是'ckeditor'路線來自'ckeditor'寶石的路線。但我所有的其他路由都在config/routes.rb中, – sameera207