使用「會員」命名空間,當我做耙路線,它不顯示,我應該使用它的路徑所以,我創建了兩個路線是剛剛出這一點; -Rails路由錯誤與命名空間?
GET /用戶/:ID (:格式)構件/構件#
GET /user/:id/edit(.:format)構件/構件#編輯
當我使用這條線,它返回一個錯誤; -
<li><%= link_to image_tag(current_user.picture, class: "user-picture"), {:controller => "Member/Member", :action => :show} if current_user.picture? %></li>
,並得到這個錯誤; -
沒有路由匹配{:動作=> 「秀」,:控制器=> 「會員/會員」}
這是我的路線; -
scope module: 'member' do
get '/user/:id', to: 'member#show'
get '/user/:id/edit', to: 'member#edit'
end
我的整個耙路線; -
Prefix Verb URI Pattern Controller#Action
charges GET /charges(.:format) charges#index
POST /charges(.:format) charges#create
new_charge GET /charges/new(.:format) charges#new
edit_charge GET /charges/:id/edit(.:format) charges#edit
charge GET /charges/:id(.:format) charges#show
PATCH /charges/:id(.:format) charges#update
PUT /charges/:id(.:format) charges#update
DELETE /charges/:id(.:format) charges#destroy
new_admin_session GET /admins/sign_in(.:format) devise/sessions#new
admin_session POST /admins/sign_in(.:format) devise/sessions#create
destroy_admin_session DELETE /admins/sign_out(.:format) devise/sessions#destroy
admin_unlock POST /admins/unlock(.:format) devise/unlocks#create
new_admin_unlock GET /admins/unlock/new(.:format) devise/unlocks#new
GET /admins/unlock(.:format) devise/unlocks#show
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) users/registrations#cancel
user_registration POST /users(.:format) users/registrations#create
new_user_registration GET /users/sign_up(.:format) users/registrations#new
edit_user_registration GET /users/edit(.:format) users/registrations#edit
PATCH /users(.:format) users/registrations#update
PUT /users(.:format) users/registrations#update
DELETE /users(.:format) users/registrations#destroy
root GET / public/public#homepage
cart_add_item POST /cart_add_item(.:format) cart/cart#add_item_to_cart
empty_cart GET /empty_cart(.:format) cart/cart#empty_cart
destroy_cart GET /destroy_cart(.:format) cart/cart#destroy
cart GET /cart(.:format) cart/cart#show
product_new GET /product/new(.:format) admin/product#new
product_create POST /product/create(.:format) admin/product#create
product_destroy GET /product/destroy(.:format) admin/product#destroy
GET /user/:id(.:format) member/member#show
GET /user/:id/edit(.:format) member/member#edit
我將如何訪問我的表演動作的d我的編輯動作?