title: Custom Rest actions
body: <p>I am trying to create a friendship and I created a custom action called accept. however i can't reach it. Everytime I call it i get the action show could not be found.</p>
  
  <p>Here my route.rb file</p>
  
  <pre><code>  resources :friendships do
      collection do
        delete 'cancel'
        get 'accept'
      end
    end
  </code></pre>
  
  <p>Here how i call it</p>
  
  <pre><code>&lt;%= link_to 'Accept', accept_friendships_path(:friend_id =&gt; f) %&gt;
  </code></pre>
  
  <p>accept_friendships was taken from rake routes commands. And here how i define my accept controller</p>
  
  <pre><code>  #Accept friendships
    def accept
      if @customer.requested_friends.include?(@friend)
        Friendship.accept(@customer, @friend)
        flash[:notice] = "Friendship Accepted"
      else
        flash[:notice] = "No Friendship request"
      end
      redirect_to root_url
    end
  </code></pre>
  
  <p>Here the error</p>
  
  <pre><code>Unknown action
  
  The action 'show' could not be found for FriendshipsController
  </code></pre>