<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,10 +11,10 @@ In controller:
   @table = TableView.new(Document, self) do |t|
     t.column :title,          :text   =&gt; true
     t.column :restricted,     :label  =&gt; &quot;paid&quot;
-    t.column :authors_names,  :th     =&gt; { :style =&gt; &quot;width:12%&quot; }, :label =&gt; &quot;author&quot;, :text    =&gt; true
+    t.column :authors_names,  :th     =&gt; { :style =&gt; &quot;width:12%&quot; }, :label =&gt; &quot;author&quot;, :text =&gt; true
     t.column :created_at,     :th     =&gt; { :style =&gt; &quot;width:8%&quot;  }, :label =&gt; &quot;date&quot;,   :default =&gt; true
     t.column :views,          :th     =&gt; { :style =&gt; &quot;width:5%&quot;  }
-    t.column :comments_count, :th     =&gt; { :style =&gt; &quot;width:8%&quot;  }, :label =&gt; &quot;comments&quot;
+    t.column :comments_count, :th     =&gt; { :style =&gt; &quot;width:8%&quot;  }, :label =&gt; &quot;comments&quot;, :not_sortable =&gt; true
   end
 
   @documents = @table.paginated_items(:per_page =&gt; 20)</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -52,6 +52,10 @@ class TableView
       options[:default]
     end
     
+    def not_sortable?
+      options[:not_sortable]
+    end
+    
     def to_s
       @column
     end</diff>
      <filename>lib/column.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,11 @@ class TableView
   
     def header(column)
       label = column.human_name
-      field = link_to(label, url_hash_for(column))
+      if column.not_sortable?
+        field = label
+      else
+        field = link_to(label, url_hash_for(column))
+      end
       helpers.content_tag(:th, &quot;#{field} #{render_sort_order(column)}&quot;, column.options[:th])
     end
 </diff>
      <filename>lib/column_renderer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ class TableView
   end
   
   def paginated_items(options={})
-    @_items ||= paginated_items_without_caching(options)
+    @items ||= paginated_items_without_caching(options)
   end
   
   def count_items</diff>
      <filename>lib/table_view.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1ce2356fd5e1b60510dc9aab3ff0df3ae721d247</id>
    </parent>
  </parents>
  <author>
    <name>Dima Sabanin</name>
    <email>sdmitry@gmail.com</email>
  </author>
  <url>http://github.com/railsmonk/table_view/commit/369e1c11d10b7c8ab20e0d3e616b7bce8399d307</url>
  <id>369e1c11d10b7c8ab20e0d3e616b7bce8399d307</id>
  <committed-date>2009-05-01T08:34:29-07:00</committed-date>
  <authored-date>2009-05-01T08:34:29-07:00</authored-date>
  <message>Added :not_sortable option for columns. Marks columns that dont need sorting or cant be sorted (associations, for example)</message>
  <tree>c2016b4d04988d2da7fcd52e884f495b326b2abb</tree>
  <committer>
    <name>Dima Sabanin</name>
    <email>sdmitry@gmail.com</email>
  </committer>
</commit>
