Skip to content

Commit c3d1c76

Browse files
committed
rename with_comments? to with_column_comments?
1 parent a749982 commit c3d1c76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/annotate/annotate_models.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def get_schema_info(klass, header, options = {})
149149
cols.each do |col|
150150
col_type = get_col_type(col)
151151
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
153153
"#{col.name}(#{col.comment.gsub(/\n/, "\\n")})"
154154
else
155155
col.name
@@ -759,7 +759,7 @@ def classified_sort(cols)
759759

760760
private
761761

762-
def with_comments?(klass, options)
762+
def with_column_comments?(klass, options)
763763
options[:with_comment] &&
764764
klass.columns.first.respond_to?(:comment) &&
765765
klass.columns.any? { |col| !col.comment.nil? }
@@ -774,7 +774,7 @@ def with_table_comments?(klass, options)
774774
def max_schema_info_width(klass, options)
775775
cols = columns(klass, options)
776776

777-
if with_comments?(klass, options)
777+
if with_column_comments?(klass, options)
778778
max_size = cols.map do |column|
779779
column.name.size + (column.comment ? width(column.comment) : 0)
780780
end.max || 0

0 commit comments

Comments
 (0)