title: can't convert Symbol into Integer
body: <p><br>
  I created a simple tables sorter:</p>
  
  <pre><code>ProductsController:   
   helper_method :sort_column, :sort_direction
    # GET /products
    # GET /products.xml
    def index
      @products = Product.order(sort_column+ " "+sort_direction)
  
      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml =&gt; @products }
      end
    end
  </code></pre>
  
  <p>Application_helper</p>
  
  <pre><code>module ApplicationHelper
  
    def sortable(column, title = nil )
      title ||= column.titleize
      direction = column == sort_column &amp;&amp; sort_direction[:direction] == "asc" ? "desc" : "asc"
      link_to title, {:sort =&gt; column, :direction =&gt; direction}
    end
  end
  </code></pre>
  
  <p>And view:</p>
  
  <pre><code> &lt;tr&gt;
      &lt;th&gt;&lt;%= sortable "name"%&gt;&lt;/th&gt;
      &lt;th&gt;&lt;%= sortable "price"%&gt;&lt;/th&gt;
      &lt;th&gt;&lt;%= sortable "released" %&gt;&lt;/th&gt;
    &lt;/tr&gt;
  </code></pre>
  
  <p>After I tried open /products page but I got this error (Rails v 3.0.3):</p>
  
  <pre><code>   can't convert Symbol into Integer
  Extracted source (around line #5):
  
  2: 
  3: &lt;table&gt;
  4:   &lt;tr&gt;
  5:     &lt;th&gt;&lt;%= sortable "name"%&gt;&lt;/th&gt;
  6:     &lt;th&gt;&lt;%= sortable "price"%&gt;&lt;/th&gt;
  7:     &lt;th&gt;&lt;%= sortable "released" %&gt;&lt;/th&gt;
  8:   &lt;/tr&gt;
  </code></pre>
  
  <p>And sort methods:</p>
  
  <pre><code> def sort_column
      Product.column_names.include?(params[:sort]) ? params[:sort] : "name"
    end
  
    def sort_direction
      %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc"
    end
  </code></pre>