title: Rails controller code appears to be ignored for a custom route
body: <p>I've got a very weird scenario where it appears that a controller action method is being ignored in a rails app.  I'm assuming this is not possible, but I need someone to help me see the "forest for the trees" :)  Here is what I have.  First a custom route:</p>
  
  <pre><code> match 'topusers/:skill', :to =&gt; 'skills#topusers', :as =&gt; :top_users
  </code></pre>
  
  <p>Then in my controller I have reduced it down to the following:class SkillsController &lt; ApplicationController</p>
  
  <pre><code>class SkillsController &lt; ApplicationController
  
          ....
  
      def top_users
          @skills = Skill.all
      end
  
          ....
  end
  </code></pre>
  
  <p>My view has been reduced to the following</p>
  
  <pre><code>&lt;% @skills.each do |skill| %&gt;
     &lt;%= skill.name %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>With this I receive an error of "undefined method `each' for nil:NilClass" on the @skills.each line.  I know there is data in the skills table and I can see that via rails console.  To troubleshoot I did a render :text => @skills.to_yaml and it appeared to be ignored.  This confused me, so I then completely removed the top_users method and still got the same error which confused me because I thought rails would scream at me for not having a top_users method.  I then thought that rails might be looking at a different controller, so I changed the name of my controller from SkillsController to SkillsXXXController.  This time rails did yell at me telling it couldn't find the controller, so I know it was at least looking at the right controller.</p>
  
  <p>So, any idea of why I am seeing this behavior?  Does my custom route look correct?  Has anyone seen this type of behavior before?</p>
  
  <p>Thanks in advance</p>
  
  <p>Chris</p>