title: Rails 3: Custom Routes Resulting in 'undefined local variable or method'
body: <p>In routes.rb:</p>
  
  <pre><code>resources :conversations, only: [:index, :show, :new, :create, :destroy] do
    collection do
      get :inbox
    end
  </code></pre>
  
  <p>In my controller:</p>
  
  <pre><code>def inbox
    &lt;stuff&gt;
  end
  </code></pre>
  
  <p>In my view (using haml):</p>
  
  <pre><code>=link_to 'Inbox', inbox_conversations, :id =&gt; 'load-inbox', :class =&gt; 'message-control-highlight', :remote =&gt; true
  </code></pre>
  
  <p>I get the following error on page load:</p>
  
  <pre><code>undefined local variable or method `inbox_conversations' for #&lt;#&lt;Class:0x3d51470&gt;:0x3d59198&gt;
  </code></pre>
  
  <p>In my view, if I replace inbox_conversations with a "#", I don't get any errors on page load. I've tried appending inbox_conversation with likely classes, such as current_user and current_user.mailbox. I've also tried changing the routing from collection to member--and even taking it out of any collection/member block. What could be the problem here?</p>