You can use will_paginate gem to include pagination.
1) Include following in your gemfile and do 'bundle install'
2) Use code like below in controller if say your model name is Post
@posts = Post.where(:published => true).paginate(:page => params[:page], :per_page => 5).order('id DESC')
3) In view file use <%= will_paginate @posts %>