diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-18 12:59:29 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-18 12:59:29 -0700 |
commit | d51139751eae2be6ee32b44edec39fcf09ed2333 (patch) | |
tree | c87d1bbb97cc5ba9f496f7c76fcf2fe7eaeee9f4 /lib/arel/engines | |
parent | d27ab7bb8ba0d8f136af2ed955d9e489ba45daec (diff) | |
download | rails-d51139751eae2be6ee32b44edec39fcf09ed2333.tar.gz rails-d51139751eae2be6ee32b44edec39fcf09ed2333.tar.bz2 rails-d51139751eae2be6ee32b44edec39fcf09ed2333.zip |
officially renamed active_relation to arel
Diffstat (limited to 'lib/arel/engines')
-rw-r--r-- | lib/arel/engines/engine.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/arel/engines/engine.rb b/lib/arel/engines/engine.rb new file mode 100644 index 0000000000..b0b7b4e955 --- /dev/null +++ b/lib/arel/engines/engine.rb @@ -0,0 +1,18 @@ +module Arel + # this file is currently just a hack to adapt between activerecord::base which holds the connection specification + # and active relation. ultimately, this file should be in effect what the connection specification is in active record; + # that is: a spec of the database (url, password, etc.), a quoting adapter layer, and a connection pool. + class Engine + def initialize(ar = nil) + @ar = ar + end + + def connection + @ar.connection + end + + def method_missing(method, *args, &block) + @ar.connection.send(method, *args, &block) + end + end +end
\ No newline at end of file |