1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Ruby 1.9.2 compat: Array#* uses to_str instead of to_s to join values since Ruby 1.9.2

[#2959 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Akira Matsuda 2009-08-06 08:34:23 +09:00 committed by Jeremy Kemper
parent b7052b8dc3
commit 230d43fbf5

View file

@ -277,7 +277,6 @@ module ActiveRecord
add_column_options!(column_sql, column_options) unless type.to_sym == :primary_key
column_sql
end
alias to_s :to_sql
private
@ -508,7 +507,7 @@ module ActiveRecord
# concatenated together. This string can then be prepended and appended to
# to generate the final SQL to create the table.
def to_sql
@columns * ', '
@columns.map(&:to_sql) * ', '
end
private