diff options
author | Prem Sichanugrist <s@sikachu.com> | 2010-08-14 05:59:15 +0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-13 16:24:49 -0700 |
commit | a7eb8d97a44d65c68df2eed61a5375a8d8da32f1 (patch) | |
tree | d8fcd97bca363fcf83b1f14db46c29e601936090 /activerecord/lib/active_record/schema_dumper.rb | |
parent | 1f250415fe7ca2657f9d54a851e084b725c2e8ef (diff) | |
download | rails-a7eb8d97a44d65c68df2eed61a5375a8d8da32f1.tar.gz rails-a7eb8d97a44d65c68df2eed61a5375a8d8da32f1.tar.bz2 rails-a7eb8d97a44d65c68df2eed61a5375a8d8da32f1.zip |
Removing most of the symbol to proc usage in Active Record
This will hopefully make Active Record run a bit more faster.
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index e9af20e1b6..4566410206 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -123,7 +123,7 @@ HEADER end.compact # find all migration keys used in this table - keys = [:name, :limit, :precision, :scale, :default, :null] & column_specs.map(&:keys).flatten + keys = [:name, :limit, :precision, :scale, :default, :null] & column_specs.map{ |k| k.keys }.flatten # figure out the lengths for each column based on above keys lengths = keys.map{ |key| column_specs.map{ |spec| spec[key] ? spec[key].length + 2 : 0 }.max } |