<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,7 @@
 
 defaults: &amp;defaults
   adapter: mysql
+  #adapter: jdbcmysql
   host: localhost
   encoding: utf8
 </diff>
      <filename>conf/database.yaml</filename>
    </modified>
    <modified>
      <diff>@@ -66,8 +66,8 @@ module RuoteRest
         :offset =&gt; offset, :limit =&gt; limit, :order =&gt; order, :conditions =&gt; cond
       }
 
-      total = ActiveRecord::Base::connection.execute(
-        'select count(*) from history').fetch_row[0].to_i
+      total = OpenWFE::Extras::HistoryEntry.count_by_sql(
+        'SELECT COUNT(*) FROM history')
 
       entries = {
         :entries =&gt; OpenWFE::Extras::HistoryEntry.find(:all, opts),</diff>
      <filename>lib/res/history.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,6 +30,8 @@ class StHistoryTest &lt; Test::Unit::TestCase
 
     get '/history.json'
 
+    #puts @response.body
+
     assert_equal 200, @response.status
 
     a = json_parse(@response.body)</diff>
      <filename>test/st_history.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>953396e3f91a8004c68628e7636db0449ee53610</id>
    </parent>
  </parents>
  <author>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </author>
  <url>http://github.com/jmettraux/ruote-rest/commit/b52b06c9b2214944c16bf292f460d1f8f429784e</url>
  <id>b52b06c9b2214944c16bf292f460d1f8f429784e</id>
  <committed-date>2009-06-22T17:36:05-07:00</committed-date>
  <authored-date>2009-06-22T17:36:05-07:00</authored-date>
  <message>rtfm'ed and now using count_by_sql. Closes gh-2</message>
  <tree>a529f9b7c385f079359b5b99309addefb972ad35</tree>
  <committer>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </committer>
</commit>
