will_paginate limit my RSS feeds too.. Any help ?

hi i use will_paginate for pagination in my blog. i set itto limit 3 posts per page but also limit my RSS feeds :confused: any suggestion ?

this is my code:

controllers/posts.controller.rb

  def index     @posts = Post.all     @posts = Post.paginate :page => params[:page], :order => 'created_at DESC', :per_page=>3

    respond_to do |format|       format.html # index.html.erb       format.xml { render :xml => @posts }       format.json { render :json => @posts }       format.rss { render }     end   end

You're using the same @posts for your rss feed as for your html. You could use a different method for your RSS feed or you can set the limit according to the call you're making.

Why is the @posts = Post.all line there anyway? You could set it to @posts_rss and send that along with your RSS feed.