title: rails path helper not recognized in model
body: <p>In my rails application I have a teams model. My route.rb file for teams looks like this:</p>
  
  <pre><code>resources :teams
  </code></pre>
  
  <p>In my teams_controller.rb file the line <code>team_path(Team.first.id)</code> works however the <code>team_path</code> url helper is not recognized in my model team.rb. I get this error message:</p>
  
  <pre><code> undefined local variable or method `team_path' for # &lt;Class:0x00000101705e98&gt;
   from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
  </code></pre>
  
  <p>I need to find a way for the model to recognize the <code>team_path</code> path helper. </p>