Skip to content

Commit

Permalink
Cache adapter_name in Sql::Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Jan 21, 2010
1 parent 8359229 commit e2dad56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/arel/engines/sql/engine.rb
Expand Up @@ -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
Expand Down

0 comments on commit e2dad56

Please sign in to comment.