limit atom feed to 50 items

This commit is contained in:
jomo
2014-07-26 01:13:32 +02:00
parent 96fe5aec08
commit dc8918ad07
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ class BlogpostsController < ApplicationController
before_filter :auth, except: [:index, :show]
def index
@posts = Blogpost.all.reverse
@posts = Blogpost.order("created_at desc")
end
def show

View File

@@ -2,7 +2,7 @@ atom_feed do |feed|
feed.title "Redstoner News"
feed.updated Time.now
@posts.each do |post|
@posts.limit(50).each do |post|
feed.entry post do |entry|
entry.updated post.updated_at
entry.author do |a|