<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,8 +11,8 @@ 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 :created_at,     :th     =&gt; { :style =&gt; &quot;width:8%&quot;  }, :label =&gt; &quot;date&quot;
+    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;
   end</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -48,6 +48,10 @@ class TableView
       options[:text]
     end
   
+    def default?
+      options[:default]
+    end
+    
     def to_s
       @column
     end</diff>
      <filename>lib/column.rb</filename>
    </modified>
    <modified>
      <diff>@@ -102,7 +102,7 @@ private
   end
   
   def mark_active_column
-    candidate = @columns.first
+    candidate = @columns.find(&amp;:default?) || @columns.first
     if params.sort_by_field
       candidate = @columns.find { |col| col.to_s == params.sort_by_field }
     end</diff>
      <filename>lib/table_view.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>72dcf8c652dfbcf8e53d33254eeed28f7f01ac3b</id>
    </parent>
  </parents>
  <author>
    <name>Dima Sabanin</name>
    <email>sdmitry@gmail.com</email>
  </author>
  <url>http://github.com/railsmonk/table_view/commit/1ce2356fd5e1b60510dc9aab3ff0df3ae721d247</url>
  <id>1ce2356fd5e1b60510dc9aab3ff0df3ae721d247</id>
  <committed-date>2009-04-21T07:32:54-07:00</committed-date>
  <authored-date>2009-04-21T07:32:54-07:00</authored-date>
  <message>Added :default key to column builder, allows selecting default column for sorting. Example in README</message>
  <tree>5f25b30cb7bd4ed83d312cb1f4e273f10116b9f2</tree>
  <committer>
    <name>Dima Sabanin</name>
    <email>sdmitry@gmail.com</email>
  </committer>
</commit>
