def xml(args) end .instruct! :xml, :version=>"1.0" xml.rss(:version=>"2.0"){ xml.channel{ xml.title("Tap and Mallet RSS Feed") xml.link("http://www.tapandmallet.com/") xml.description("Rochester's destination for fine beers and freshly cooked pub food.") xml.language('en-us') for tap in @taps xml.item do xml.title(tap.draft_on_tap_name) xml.description(tap.draft_on_tap_desc) xml.author("Tap and Mallet") xml.pubDate(tap.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z")) xml.link("http://www.tapandmallet.com/draft/") xml.guid("http://www.tapandmallet.com/draft/#" + tap.id.to_s) end end for bottle in @bottles xml.item do xml.title(bottle.name) xml.description(bottle.description) xml.author("Tap and Mallet") xml.pubDate(bottle.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z")) xml.link("http://www.tapandmallet.com/bottled/") xml.guid("http://www.tapandmallet.com/bottled/#" + bottle.id.to_s) end end for post in @posts xml.item do xml.title(post.try(:title)) xml.description(post.description) xml.author("Tap and Mallet") xml.pubDate(post.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z")) xml.link("http://www.tapandmallet.com/draft/") xml.guid("http://www.tapandmallet.com/post/#" + post.id.to_s) end end for food in @foods xml.item do xml.title(food.name) xml.description(food.description) xml.author("Tap and Mallet") xml.pubDate(food.updated_at.strftime("%a, %d %b %Y %H:%M:%S %z")) xml.link("http://www.tapandmallet.com/public/menu/") xml.guid("http://www.tapandmallet.com/public/menu/#" + food.id.to_s) end end } }