Trying to order a list view


I’m trying to order a list view which contains elements from related
tables and wanting to use columns from the related tables to create the

The error…

NoMethodError in Placements#list
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.facility

The code…


def list
@client = Client.find(:all)
@facility = Facility.find(:all)
@placement_pages, @placements = paginate :placements, :order =>, :per_page => 14

If I remove the :order =>

I get the listing (unordered) with the column - no
problem. (facilies table is tied to placements table via foreign
keys/placements ‘belongs_to :facility’)

I want to be able to offer the list view ordered in different ways and
can’t figure out the entry to do that.