我创建一个简单的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