Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove AR version < 3 guard around some caching methods (sugg. invade…

…rsmustdie)

Seems to work fine, no tests break. Don't remember why this went there
originally :(.
  • Loading branch information...
commit 7b63cc350e787bc92b005320911f2cc4144ef767 1 parent 618fc86
Nick Sieger nicksieger authored

Showing 1 changed file with 8 additions and 10 deletions. Show diff stats Hide diff stats

  1. +8 10 lib/arjdbc/jdbc/adapter.rb
18 lib/arjdbc/jdbc/adapter.rb
@@ -202,16 +202,14 @@ def jdbc_select_all(sql, name = nil)
202 202 select(sql, name)
203 203 end
204 204
205   - if ActiveRecord::VERSION::MAJOR < 3
206   - # Allow query caching to work even when we override alias_method_chain'd methods
207   - alias_chained_method :select_all, :query_cache, :jdbc_select_all
208   - alias_chained_method :update, :query_dirty, :jdbc_update
209   - alias_chained_method :insert, :query_dirty, :jdbc_insert
210   -
211   - # Do we need this? Not in AR 3.
212   - def select_one(sql, name = nil)
213   - select(sql, name).first
214   - end
  205 + # Allow query caching to work even when we override alias_method_chain'd methods
  206 + alias_chained_method :select_all, :query_cache, :jdbc_select_all
  207 + alias_chained_method :update, :query_dirty, :jdbc_update
  208 + alias_chained_method :insert, :query_dirty, :jdbc_insert
  209 +
  210 + # Do we need this? Not in AR 3.
  211 + def select_one(sql, name = nil)
  212 + select(sql, name).first
215 213 end
216 214
217 215 def select_rows(sql, name = nil)

0 comments on commit 7b63cc3

Please sign in to comment.
Something went wrong with that request. Please try again.