title: paginate_by_sql and Rails3.0.0Beta4
body: <p>I am trying to port an existing rails app running rails 2.3.8 to 
  3.0.0beta4.</p>
  
  <p>I currently use this paginate_by_sql hack </p>
  
  <pre><code>module ActiveRecord 
      class Base 
          def self.find_by_sql_with_limit(sql, offset, limit) 
              sql = sanitize_sql(sql) 
              add_limit!(sql, {:limit =&gt; limit, :offset =&gt; offset}) 
              find_by_sql(sql) 
          end 
          def self.count_by_sql_wrapping_select_query(sql) 
              sql = sanitize_sql(sql) 
              count_by_sql("select count(*) from (#{sql}) as x") 
          end 
     end 
  end 
  </code></pre>
  
  <p>The add_limit! method has been removed from ActiveRecord::Base class. 
  Are there any work arounds for this?  Any alternatives to doing 
  pagination by SQL in Rails 3.0.0? </p>
  
  <p>Thanks</p>