我正在尝试从控制器调用操作2升级文件夹结构命名空间
<%= link_to( "Reset Search" ,
{:controller => "../../application",
:action => 'reset_search',
:reset_search_redirect => reset_search_redirect},
class: 'tiny button') %>
"../../application"
有效!然而;我不认为这是轨道。有没有更好的办法?
这是我刚放:controller => "application"
/human_resources/settings/application/reset_search?reset_search_redirect=%2Fhuman_resources%2Fsettings
哪个不起作用。
以下是我的路线:
get 'human_resources/' => 'human_resources#index'
namespace :human_resources do
get 'settings/' => 'settings#index'
namespace :settings do
get 'constants/' => 'constants#index'
resources :constants
end
end
resources :test, only: :index
root to: 'home#index'
match ':controller(/:action(/:id))', :via => [:get, :post]