summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/rss_controller.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb
index 4b47218..489a732 100644
--- a/app/controllers/rss_controller.rb
+++ b/app/controllers/rss_controller.rb
@@ -22,6 +22,24 @@ class RssController < ApplicationController
22 end 22 end
23 end 23 end
24 24
25 def tag_updates
26 expires_in 31.minutes, :public => true
27
28 I18n.locale = I18n.default_locale
29 @tag = params[:tag]
30 @items = Page.heads
31 .joins("JOIN taggings ON taggings.taggable_id = pages.id
32 AND taggings.taggable_type = 'Page'
33 AND taggings.context = 'tags'")
34 .joins("JOIN tags ON tags.id = taggings.tag_id")
35 .where("LOWER(tags.name) = ?", @tag.downcase)
36 .order("published_at DESC").limit(20)
37
38 respond_to do |format|
39 format.xml {}
40 end
41 end
42
25 def recent_changes 43 def recent_changes
26 @items = Page.where( 44 @items = Page.where(
27 "updated_at < ? AND updated_at > ?", Time.now, Time.now - 14.days 45 "updated_at < ? AND updated_at > ?", Time.now, Time.now - 14.days