由于我的 routes.rb 文件的组织方式,我不断收到奇怪的错误。最新的一个是某些功能在模型关系控制器中找不到动作“显示”(动作显然在那里)。我想这是因为我正在通过集合添加一些自定义操作,并且有关声明路由的顺序的一些东西搞砸了。有人可以看看这个并说出什么问题吗?
YApp::Application.routes.draw do
require 'resque/server'
match 'login' => 'user_sessions#new', :as => :login
match 'logout' => 'user_sessions#destroy', :as => :logout
match '/get_idx', :to => 'nodes#get_idx'
resource :relations do
collection do
post 'this_relation'
post "iframize"
end
end
resource :words do
get 'page/:page', :action => :index, :on => :collection
collection do
get 'front'
get 'index'
end
end
resource :recommendations do
collection do
get 'find_votes'
end
end
get "connotation/create"
get "connotation/edit"
get "connotation/update"
root :to => "words#front", :as => :homepage
resources :users, :user_sessions, :relations, :evaluation, :phrases, :metawords, :nodes, :recommendations, :words
mount Resque::Server.new, :at => "/resque"
match 'about' => 'words#index' , :as => :about
match 'contact' => 'keywords#index' , :as => :contact
end