У меня есть этот код в моем файле rout.db:
resources :users do
member do
get :following, :followers
end
end
, и я получаю сообщение об ошибке:
can't use member outside resource(s) scope (ArgumentError)
Как это исправить?
ОБНОВЛЕНИЕ: вот весь код моего файла rout.db:
SampleApp::Application.routes.draw do
get "sessions/new"
resources :users
member do
get :following, :followers
end
resources :sessions, :only => [:new, :create, :destroy]
resources :microposts, :only => [:create, :destroy]
resources :relationships, :only => [:create, :destroy]
match '/signup', :to => 'users#new'
match '/signin', :to => 'sessions#new'
match '/signout', :to => 'sessions#destroy'
match '/contact', :to => 'pages#contact'
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
root :to => 'pages#home'