のルーティングを取得呼び出すために、こののlink_toヘルパーを取得、私はそれでこの機能を持っているusers_controllerを持っていますそれ。は、[表示] - エラー
<%= link_to 'Click HERE to open file', @user.image.url %><br/><br/><br/>
<%= label_tag(:q, "Parse CSV File:") %><br/>
<%= link_to 'Parse CSV', {:controller => "users", :action => "process" } %>
<% end %>
これは私のすくいルートの出力です:
process_users GET /users/process(.:format) users#process
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
listings GET /listings(.:format) listings#index
POST /listings(.:format) listings#create
new_listing GET /listings/new(.:format) listings#new
edit_listing GET /listings/:id/edit(.:format) listings#edit
listing GET /listings/:id(.:format) listings#show
PUT /listings/:id(.:format) listings#update
DELETE /listings/:id(.:format) listings#destroy
これは
resources :users do
collection do
get:process
end
end
資源私のroutes.rbをファイルです:リスト私はリンクをクリックし
show.html.erbファイルにあります。私はprocess.html.erbビューに誘導されることを望んでいました。代わりに私はエラーが表示されます:
Routing Error
No route matches [GET] "/assets"
Iveは何も変わっていませんが、何も変わっていません。だから、誰かが私に手を差し伸べることができるかどうか疑問に思います
おかげで、
を私はあなたの追加質問を見ました。 show.html.erbに2つのリンクがあるので、クリックしたリンクを明確にして、「ルーティングエラー」を引き起こす可能性がありますか?生成されたHTMLを投稿してください。 –