Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Am not sure if you're defining both these side by side. In my experience, the first route you're attempting to map would would actually be handled just fine by the second (thanks to the default value you provided for <code>attribute</code>).</p> <p>Thus, this route:</p> <pre><code>foo.com/resources/user/:id/:attribute </code></pre> <p>With this call:</p> <pre><code>foo.com/resources/user/12345/ </code></pre> <p>Would assume your default attribute value:</p> <pre><code>foo.com/resources/user/12345// </code></pre> <p>As the blank value may be removed by your web server (apache treats multiple slashes as a single slash), I'd recommend defaulting the attribute to something that could be called by name and it will function similar to an index.html file in a folder:</p> <pre><code>foo.com/resources/user/12345/ foo.com/resources/user/12345/general/ (same result) </code></pre> <p>The best luck I've had troubleshooting is commenting out the route default values and requirements line-by-line in a sequence. You end up seeing the 'edge' of the route itself (as it will fall back to the defaults as you give it less information).</p> <p>Also, in your example, note that you're defining your <code>id</code> requirements twice:</p> <pre><code> routes.user_attribute.reqs.id = "\d+" routes.user_attribute.reqs.id = "reviews|lists" </code></pre> <p>Would be adjusted to:</p> <pre><code> routes.user_attribute.reqs.id = "\d+" routes.user_attribute.reqs.attribute = "reviews|lists" </code></pre> <p>May have an effect on your results as well. Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload