Archive: ComponentOwl Rails app, DB backups, go redirect script
This commit is contained in:
15
app/controllers/feeds_controller.rb
Normal file
15
app/controllers/feeds_controller.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class FeedsController < ApplicationController
|
||||
layout false
|
||||
|
||||
def index
|
||||
posts = WpBlogPost.find(:all, :limit => Settings.rss.posts)
|
||||
releases = Release.find_latest_for_rss
|
||||
|
||||
p = (posts + releases).sort {|x, y| x.date.to_datetime <=> y.date.to_datetime }
|
||||
@posts = p.reverse.slice(0, Settings.rss.posts)
|
||||
|
||||
respond_to do |format|
|
||||
format.rss
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user