diff options
Diffstat (limited to 'lib/active_relation/engines')
-rw-r--r-- | lib/active_relation/engines/engine.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/active_relation/engines/engine.rb b/lib/active_relation/engines/engine.rb index 36b77b886e..d5b312607e 100644 --- a/lib/active_relation/engines/engine.rb +++ b/lib/active_relation/engines/engine.rb @@ -1,4 +1,18 @@ module ActiveRelation + # 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 |