Untitled


SUBMITTED BY: Guest

DATE: Dec. 17, 2013, 4:31 a.m.

FORMAT: Text only

SIZE: 474 Bytes

HITS: 3054

  1. match '/clients/prospects' => 'clients#prospects'
  2. get '/clients/prospects' => 'clients#prospects' # or match for older Rails versions
  3. resources :clients
  4. class ClientsController < ApplicationController
  5. def index
  6. @clients = Client.where(prospect: false)
  7. end
  8. def prospects
  9. @prospects = Client.where(prospect: true)
  10. end
  11. end
  12. resources :clients do
  13. collection do
  14. get :prospects
  15. end
  16. end

comments powered by Disqus