search for: xmlcontroller

Displaying 2 results from an estimated 2 matches for "xmlcontroller".

2005 Jun 26
4
calling controller and caching from a sweeper class
[cross-posting to rails and typo lists] Hi, I''m tinkering with the code for typo, a rails-based blog engine. Typo has an XmlController with actions "rss" and "atom" which generate feed.xml files, and it uses a caches_page declaration to cache the files that get generated by those actions. It also has a Sweeper (Observer) class that expires those cached files when a blog post is created or modified: http://t...
2006 Jun 14
1
page caching with custom routes
...39;'ll show some code blog_controller --------------- def clear_cache_rss_artikels expire_page url_for(:controller => "xml",:action => "rss_artikels") end this is called when a new article is posted or edited or destroyed xml_controller --------------- class XmlController < ApplicationController caches_page :rss_artikels def rss_artikels @articles = Article.find(:all) end end routes.rb ---------- map.rss "rss/blog/artikels",:controller => "xml",:action => "rss_artikels" when the rss feed is called , rails make a...