diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-17 13:35:16 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-18 12:42:24 -0700 |
commit | 485e7f25f29ca1ca23bb214b802cf68840dabbb6 (patch) | |
tree | 535f0c96556f268df114350891bbdce75bbe054a /activerecord/lib/active_record/schema_dumper.rb | |
parent | b39131e8bdb65a9ee51e49d7fe8f058e702e173b (diff) | |
download | rails-485e7f25f29ca1ca23bb214b802cf68840dabbb6.tar.gz rails-485e7f25f29ca1ca23bb214b802cf68840dabbb6.tar.bz2 rails-485e7f25f29ca1ca23bb214b802cf68840dabbb6.zip |
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.
Diffstat (limited to 'activerecord/lib/active_record/schema_dumper.rb')
-rw-r--r-- | activerecord/lib/active_record/schema_dumper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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|" |