【发布时间】:2011-11-09 04:53:54
【问题描述】:
我正在使用 Rails 3 创建一个简单的 CMS。在我的 routes.rb 文件中,我有以下条目来捕获所有路由:
match '*url', :controller => 'site', :action => 'dynamic_page'
我正在使用ckeditor gem 来获得编辑器支持。我的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"}
..在 ckeditor 路由之前加载,因此 ckeditor 路由不起作用。有人可以帮我加载ckeditor路由之前吗:
/*url(.:format) {:action=>"dynamic_page", :controller=>"site"}
提前致谢。
【问题讨论】: