diff options
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index cc3bb1cd06..5105088b2f 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -1,4 +1,4 @@ -require 'stringio' +require "stringio" module ActiveRecord # = Active Record Schema Dumper @@ -111,7 +111,7 @@ HEADER case pk when String - tbl.print ", primary_key: #{pk.inspect}" unless pk == 'id' + tbl.print ", primary_key: #{pk.inspect}" unless pk == "id" pkcol = columns.detect { |c| c.name == pk } pkcolspec = @connection.column_spec_for_primary_key(pkcol) if pkcolspec.present? @@ -161,12 +161,12 @@ HEADER # add column type definition to our format string format_string.unshift " t.%-#{type_length}s " - format_string *= '' + format_string *= "" column_specs.each do |colspec| values = keys.zip(lengths).map{ |key, len| colspec.key?(key) ? colspec[key] + ", " : " " * len } values.unshift colspec[:type] - tbl.print((format_string % values).gsub(/,\s*$/, '')) + tbl.print((format_string % values).gsub(/,\s*$/, "")) tbl.puts end @@ -213,7 +213,7 @@ HEADER index.columns.inspect, "name: #{index.name.inspect}", ] - index_parts << 'unique: true' if index.unique + index_parts << "unique: true" if index.unique index_lengths = (index.lengths || []).compact index_parts << "length: #{Hash[index.columns.zip(index.lengths)].inspect}" if index_lengths.any? |