title: Rails catch all route prevents access to public folder
body: <p>... which makes sense. I'm using the catch all route for page routing in a custom CMS. However I would still like to access user uploaded assets in my public folder. My route is as follows:</p>
  
  <pre><code>match "(*url)" =&gt; 'pages#show'
  </code></pre>
  
  <p>And my controller does this:</p>
  
  <pre><code>def show
      @page = Page.where(:url =&gt; ['/', params[:url]].join).first
       begin
          render :template =&gt; "templates/" + @page.template.slug
       rescue
          render "public/404.html"
       end
  end
  </code></pre>
  
  <p>Now I know I could probably parse the url in my controller but I was wondering if there is a better rails way - for example, can I add an exception to the catch all route?</p>
  
  <p>Thoughts?</p>