title: Rails - link_to with custom route
body: <p>I am new to Rails so please have patience.</p>
  
  <p>I wanted to implement "like" on my canteen model, so I created a custom route inside my canteen resource</p>
  
  <pre><code>resources :canteens do
    resources :meals
    resources :comments
    match "/like", :to =&gt; "canteens#like", :as =&gt; "like"
  end
  </code></pre>
  
  <p>and therefore created this action inside canteens controller, where I just increment a counter</p>
  
  <pre><code>def like    
    canteen = Canteen.find(params[:canteen_id])
    Canteen.increment_counter("likes_count", canteen.id)
    redirect_to canteen
  end
  </code></pre>
  
  <p>So, manually entering the URL localhost:3000/canteens/1/like works just fine, however obviously I want to create a button so I did a</p>
  
  <pre><code>&lt;h2&gt;Likes count&lt;/h2&gt;
  &lt;p&gt;&lt;%= @canteen.likes_count %&gt; likes&lt;/p&gt;
  &lt;p&gt;&lt;%= link_to "Like this canteen", canteen_like_path %&gt;&lt;/p&gt;
  </code></pre>
  
  <p>And it doesn't work. I checked rake routes and it's there (canteen_like).
  What am I doing wrong?</p>