You would sort them in the controller. Your controller may look like:
class PostsController < ApplicationController
@posts = Post.find(:all)
Change the find to be:
@posts = Post.find(:all, :order => "last_name, first_name")
So, @posts, when it gets to the view, is ordered the way you want it.
The view simply does the viewing.