From 485e7f25f29ca1ca23bb214b802cf68840dabbb6 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Sun, 17 Apr 2016 13:35:16 -0700 Subject: Database comments: switch to keyword args for new table options * Switch to keyword args where we can without breaking compat. * Use add_table_options! for :options, too. * Some code polish. --- activerecord/lib/active_record/schema_dumper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/schema_dumper.rb') diff --git a/activerecord/lib/active_record/schema_dumper.rb b/activerecord/lib/active_record/schema_dumper.rb index bc4adb4ed7..b4229cba04 100644 --- a/activerecord/lib/active_record/schema_dumper.rb +++ b/activerecord/lib/active_record/schema_dumper.rb @@ -138,8 +138,9 @@ HEADER table_options = @connection.table_options(table) tbl.print ", options: #{table_options.inspect}" unless table_options.blank? - comment = @connection.table_comment(table) - tbl.print ", comment: #{comment.inspect}" if comment + if comment = @connection.table_comment(table) + tbl.print ", comment: #{comment.inspect}" + end tbl.puts " do |t|" -- cgit v1.2.3