title: Rails: Custom nested controller actions
body: <p>I want to setup a custom nested controller actions but I can't figure out the routing.</p>
  
  <p>I keep getting the following error</p>
  
  <pre><code>No route matches [GET] "/assets"
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>resources :companies do
    resources :requests do
      match :accept
    end
  end
  </code></pre>
  
  <p>index.html.rb</p>
  
  <pre><code>&lt;% @requests.each do |request| %&gt;
    &lt;ul class="users"&gt;
      &lt;li&gt;
      &lt;%= full_name(request.profile) %&gt; 
      &lt;%= request.status %&gt; 
      &lt;%= link_to "Accept",
              :controller =&gt; "requests", :action =&gt; "accept",
              :id =&gt; request.id %&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;% end %&gt;
  </code></pre>