limit atom feed to 50 items
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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|
|
||||
|
||||
Reference in New Issue
Block a user