title: difference between collection route and member route in ruby on rails?
body: <p>What is the difference between collection routes and member routes in Rails?</p>
  
  <p>For example,</p>
  
  <pre><code>resources :photos do
    member do
      get :preview
    end
  end
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>resources :photos do
    collection do
      get :search
    end
  end
  </code></pre>
  
  <p>I don't understand.</p>