xml.instruct! xml.urlset "xmlns" => "http://www.google.com/schemas/sitemap/0.84" do xml.url do xml.loc "http://www.yourdomain.com/" xml.lastmod w3c_date(Time.now) xml.changefreq "always" end @pages.each do |post| xml.url do xml.loc 'http://www.pottsauction.com' + post.url xml.lastmod w3c_date(post.created_at) xml.changefreq "weekly" xml.priority 0.6 end end @auctions.each do |post| xml.url do xml.loc auction_url(post) xml.lastmod w3c_date(post.created_at) xml.changefreq "weekly" xml.priority 0.6 end end @items.each do |post| xml.url do xml.loc item_url(post.category, post) xml.lastmod w3c_date(post.created_at) xml.changefreq "weekly" xml.priority 0.6 end end end