Permalink
Browse files

changing feeds builder to not feed other_posts

  • Loading branch information...
1 parent 43ac59b commit 25b9cd8322cdbbb18c15d37ec563a4b1ceb1942c @HugoLnx committed Sep 28, 2011
Showing with 1 addition and 14 deletions.
  1. +1 −3 app/controllers/posts_controller.rb
  2. +0 −11 app/views/posts/feed.rss.builder
@@ -28,10 +28,8 @@ def show
:robots => @robots_metatag
end
- DONT_FEED_LOCATIONS = ['sobre-mim']
def feed
- @posts, @other_posts = Post.all.partition{|post| post.location == LOCATION}
- @other_posts.delete_if{|post| DONT_FEED_LOCATIONS.include? post.location}
+ @posts = Post.find_all(:location => LOCATION)
respond_to do |format|
format.rss { render 'feed', :layout => false }
@@ -17,16 +17,5 @@ xml.rss :version => "2.0" do
xml.guid post_url(post)
end
end
-
- for post in @other_posts
- xml.item do
- xml.title post.title
- xml.description post.body_with_syntax_highlighting
- xml.pubDate post.creation_date.strftime("%a, %d %b %Y %H:%M:%S %z")
- xml.lastBuildDate post.last_modification_date.strftime("%a, %d %b %Y %H:%M:%S %z") unless post.last_modification_date.nil?
- xml.link other_post_url(post.location,post.friendly_title)
- xml.guid other_post_url(post.location,post.friendly_title)
- end
- end
end
end

0 comments on commit 25b9cd8

Please sign in to comment.