@@ -149,7 +149,7 @@ def get_schema_info(klass, header, options = {})
149
149
cols . each do |col |
150
150
col_type = get_col_type ( col )
151
151
attrs = get_attributes ( col , col_type , klass , options )
152
- col_name = if with_comments ?( klass , options ) && col . comment
152
+ col_name = if with_column_comments ?( klass , options ) && col . comment
153
153
"#{ col . name } (#{ col . comment . gsub ( /\n / , "\\ n" ) } )"
154
154
else
155
155
col . name
@@ -759,7 +759,7 @@ def classified_sort(cols)
759
759
760
760
private
761
761
762
- def with_comments ?( klass , options )
762
+ def with_column_comments ?( klass , options )
763
763
options [ :with_comment ] &&
764
764
klass . columns . first . respond_to? ( :comment ) &&
765
765
klass . columns . any? { |col | !col . comment . nil? }
@@ -774,7 +774,7 @@ def with_table_comments?(klass, options)
774
774
def max_schema_info_width ( klass , options )
775
775
cols = columns ( klass , options )
776
776
777
- if with_comments ?( klass , options )
777
+ if with_column_comments ?( klass , options )
778
778
max_size = cols . map do |column |
779
779
column . name . size + ( column . comment ? width ( column . comment ) : 0 )
780
780
end . max || 0
0 commit comments