Hi everyone, I have a set of files(images) to display, I have in my contorller... def viewpatient @patient = Patient.find(@params[:id]) patientdirectory = replacedircharacters(@patient.patientname) patientdirectory = stripspacecharacters(patientdirectory) basedir = ''public/images/'' + patientdirectory + ''/*.jpg'' @images = Dir.glob(basedir) @images = @images.collect{|x| x.gsub(/public/,"") } #@pages = Paginator.new self, @images.size,20, @params[:page] #first = @pages.current.offset #last = [first + 20, @images.size].min #@images = @images[first...last] end I wanted to have the pagination effect for @images, whats the best possible way? I am not getting any clue of doing it. please help me. Regards Gnan