title: Rails sitemap generator, undefined method post_path?
body: <p>I am using the following gem:</p>
  
  <p><a href="https://github.com/kjvarga/sitemap_generator" rel="nofollow">https://github.com/kjvarga/sitemap_generator</a></p>
  
  <p>I have a posts model and have used post_path(post) in other parts of the application as it is based on Enki.</p>
  
  <p>However in the sitemap file:</p>
  
  <pre><code>Post.all.each do |post|
      sitemap.add post_path(post), :lastmod =&gt; post.updated_at
    end
  </code></pre>
  
  <p>This returns the error when running the rake task  rake sitemap:refresh:</p>
  
  <pre><code>rake aborted!
  undefined method `post_path' for #&lt;SitemapGenerator::Interpreter:0x279efd0&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>Post.all.each do |post|
    sitemap.add posts_path(post), :lastmod =&gt; post.updated_at
  end
  </code></pre>
  
  <p>Returns no errors. Can anyone shed any light on this or do I need to provide more of the code?</p>