diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-10 11:14:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-04-10 11:14:23 -0700 |
commit | 048478bf152a495a2d0ba17990d6966970a38cff (patch) | |
tree | ae4bc31be51f32c22f9225509d1cdfd8d5e7bd63 /lib/arel/insert_manager.rb | |
parent | 4b187a19b16ed4cb0b248e4e4d658a4ef6e8f26e (diff) | |
parent | 4a898b3c682f74890065e28ffe03899f23a4ab20 (diff) | |
download | rails-048478bf152a495a2d0ba17990d6966970a38cff.tar.gz rails-048478bf152a495a2d0ba17990d6966970a38cff.tar.bz2 rails-048478bf152a495a2d0ba17990d6966970a38cff.zip |
Merge pull request #255 from byroot/insert-select
Allow INSERT INTO <table> SELECT queries
Diffstat (limited to 'lib/arel/insert_manager.rb')
-rw-r--r-- | lib/arel/insert_manager.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/insert_manager.rb b/lib/arel/insert_manager.rb index b5d2aeb3a4..8839dd8181 100644 --- a/lib/arel/insert_manager.rb +++ b/lib/arel/insert_manager.rb @@ -13,6 +13,10 @@ module Arel def columns; @ast.columns end def values= val; @ast.values = val; end + def select select + @ast.select = select + end + def insert fields return if fields.empty? |