title: Railscasts #228 - Sortable Table Columns
body: <p>I am following Ryan Bates' railscast on Sortable Table Columns and I have successfully gotten a column to sort ascending and descending.</p>
  
  <p>My table is more complex than in the Railscast because I have columns from different tables.</p>
  
  <pre><code># controller
  @cars = Car.find(:all).order(sort_column + " " + sort_direction).includes(:manufacturers)
  
  
  #view
  &lt;%= sortable "age" %&gt;
  </code></pre>
  
  <p>How do you add sortable columns for related tables such as manufacturers?</p>