aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-10-12 16:03:11 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-10-26 13:44:07 -0700
commit853d39e8540a8af4c42592a172d4cf4f9c0f4e9f (patch)
tree432edc750d56867b67214299f6ab7e027aeed10e /activerecord
parentcc468d3ec81d6f1298fca91c0549584b36dafcc6 (diff)
downloadrails-853d39e8540a8af4c42592a172d4cf4f9c0f4e9f.tar.gz
rails-853d39e8540a8af4c42592a172d4cf4f9c0f4e9f.tar.bz2
rails-853d39e8540a8af4c42592a172d4cf4f9c0f4e9f.zip
removing some uses of execute
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 75bf579764..0d828046d7 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -173,9 +173,7 @@ module ActiveRecord
alias :create :insert_sql
def select_rows(sql, name = nil)
- execute(sql, name).map do |row|
- (0...(row.size / 2)).map { |i| row[i] }
- end
+ exec(sql, name).rows
end
def begin_db_transaction #:nodoc:
@@ -199,7 +197,7 @@ module ActiveRecord
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
SQL
- execute(sql, name).map do |row|
+ exec(sql, name).map do |row|
row['name']
end
end