Permalink
Browse files

Cache adapter_name in Sql::Engine

  • Loading branch information...
lifo committed Jan 21, 2010
1 parent 8359229 commit e2dad56caae7ed7697f8d9b4e9d6a62faa308046
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/arel/engines/sql/engine.rb
@@ -9,6 +9,10 @@ def connection
@ar.connection
end
+ def adapter_name
+ @adapter_name ||= connection.adapter_name
+ end
+
def method_missing(method, *args, &block)
@ar.connection.send(method, *args, &block)
end

0 comments on commit e2dad56

Please sign in to comment.