ruby on rails - Dynamic Sitemap Errors -


i'm trying dynamic_sitemaps gem work site, readme technical , bit on head @ moment.

i'm running errors when trying generate sitemap bit of code.

# can have multiple sitemaps above – make sure names different.  # automatically link pages using routes specified # using "resources :pages" in config/routes.rb. # automatically set <lastmod> date , time in page.updated_at: # sitemap_for :offers 

it's returning below error

argumenterror: collection given sitemap_for must respond find_each. performance. use model.scoped activerecord relation responds find_each.

i'm looking have sitemap contain offer posts etc.

any appreciated!

if model's name offer, try

sitemap_for offer.all 

(note: #scoped deprecated, #all seems better option going forward)


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -