title: Is it possible to use association like active record when using sitemap generator?
body: <p>I'm trying to use the gem called   <a href="https://github.com/kjvarga/sitemap_generator" rel="nofollow">sitemap_generator</a></p>
  
  <p>Then I've done with setup then I coded like this below</p>
  
  <p><strong>sitemap.rb</strong></p>
  
  <pre><code>SitemapGenerator::Sitemap.create do
  
    Code.find_each do |f|
      add "/community/#{f.community.community_name}/code/#{f.id}", :lastmod =&gt; f.updated_at
    end
  
  end
  </code></pre>
  
  <p>But I get this error if I run <code>rake sitemap:refresh</code></p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>rake aborted!
  undefined method `community_name' for nil:NilClass
  </code></pre>
  
  <p>Am I not supposed to be able to use nested association within this?
  If possible, how can I?</p>
  
  <p>By the way, <code>Code</code> belongs to <code>Community</code>, and <code>Community</code> has many <code>Codes</code><br>
  It's already defined in model, and working fine.</p>