diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-30 06:11:06 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-30 06:11:06 -0700 |
commit | 6cf44a1bd64ba10497742d70ad78fe68faa16e99 (patch) | |
tree | 3180ea30eb614e3ce0d24fd4f523c9452add461b /activerecord | |
parent | 973b90877755522772480bce73fcbc17320da2ef (diff) | |
download | rails-6cf44a1bd64ba10497742d70ad78fe68faa16e99.tar.gz rails-6cf44a1bd64ba10497742d70ad78fe68faa16e99.tar.bz2 rails-6cf44a1bd64ba10497742d70ad78fe68faa16e99.zip |
no need to to_i, sqlite does that for us
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index a4d7d12298..0844e5d7d7 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -226,7 +226,7 @@ module ActiveRecord IndexDefinition.new( table_name, row['name'], - row['unique'].to_i != 0, + row['unique'] != 0, exec("PRAGMA index_info('#{row['name']}')").map { |col| col['name'] }) @@ -235,7 +235,7 @@ module ActiveRecord def primary_key(table_name) #:nodoc: column = table_structure(table_name).find { |field| - field['pk'].to_i == 1 + field['pk'] == 1 } column && column['name'] end |