```ruby
Rails.application.routes.draw do

  root to: 'pages#home'

  resources :members, only: [:index, :show] do
    collection do
      get :popular
      get :search
    end
  end

end
```

Add post method for search
user
```ruby
Rails.application.routes.draw do

  root to: 'pages#home'

  resources :members, only: [:index, :show] do
    collection do
      get :popular
      match :search, via: [:get, :post]
    end
  end

end
```
assistant