Make database offline mode work
[rails.git] / config / initializers / query_cache.rb
index 83d42feecc29b941e25c0a4f9f7d269a400a5623..92372faf3c18762125f9dd8abf2e3e760a566477 100644 (file)
@@ -1,10 +1,12 @@
-module ActiveRecord
-  module ConnectionAdapters
-    module QueryCache
-      private
-        def cache_sql(sql)
-         yield
-        end
+if defined?(ActionRecord::ConnectionAdaptors::QueryCache)
+  module ActiveRecord
+    module ConnectionAdapters
+      module QueryCache
+        private
+          def cache_sql(sql)
+         yield
+          end
+      end
     end
   end
 end