title: rails 4 routes constraints condition error
body: <p>I have used Rails 3.0 with routes.rb it works well.But now,I upgraded Rails to 4.0 then this routes causes the No route matches [GET] "/project/12323/payment"</p>
  
  <pre><code>match "project/:id/payment" =&gt; "project#payment", :as =&gt; "project_payment", :via      =&gt; :get, :constraints =&gt; { :protocol =&gt; Rails.env.production? ? 'https' : 'http' }
  </code></pre>
  
  <p>If I remove <code>:constraints =&gt; { :protocol =&gt; Rails.env.production? ? 'https' : 'http' }</code>, again it works.I guess the problem is about :constraints syntax but I don't sure.</p>
  
  <p>Do you know how can I fix it?</p>