Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

internal variable renamed

  • Loading branch information...
commit e67d90733de07b430de25491ca5b17bfd656541a 1 parent 6e4b9aa
@kucaahbe authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/annotated/models.rb
View
10 lib/annotated/models.rb
@@ -51,11 +51,11 @@ def annotation
# #{ANNOTATION % 'above'}
#++
annfooter
- annotation_body = []
+ annotation_table = []
# append table name:
- annotation_body << "# Table name: #{table_name}"
- annotation_body << '#'
+ annotation_table << "# Table name: #{table_name}"
+ annotation_table << '#'
# TODO check if abstract class (http://apidock.com/rails/ActiveRecord/Base/inspect/class)
column_with_maximum_name_length = @model.columns.map(&:name).max_by { |c| c.length }.length
@@ -73,7 +73,7 @@ def annotation
# TODO indexes
# TODO SQL type at the end of table?
- annotation_body << sprintf(
+ annotation_table << sprintf(
%Q|# %s %-#{column_with_maximum_name_length+1}s:%-16s%s|,
column.primary && PRIMARY_KEY_MARK || ' ',
column.name,
@@ -82,7 +82,7 @@ def annotation
).rstrip
end
- annotation_header + annotation_body.join("\n") + annotation_footer
+ annotation_header + annotation_table.join("\n") + annotation_footer
end
def add_regexp
Please sign in to comment.
Something went wrong with that request. Please try again.