paginate in rails 2.3.3

Hi all,

i want to do paging in my project. i am trying to using will_paginate but i can not do it. i am follow following step

1. download will_paginate and put in vendor/plugin/ 2. require 'will_paginate' in config/environment.rb 3. i want to use paging in image display so that in image controller

def index     @images = Image.paginate :page => params[:page], :per_page => 5   respond_to do |format|     format.html # index.html.erb     format.xml { render :xml => @images }     end   end

4. in Image model         def self.per_page             4          end 5. in index.html.erb           <%= will_paginate @image%>