Skip to content

Commit 134b833

Browse files
thedanielhankectran
authored andcommitted
Add missing complete-foreign-keys option (introduced in #476) to bin (#477)
1 parent 22d796c commit 134b833

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.rubocop_todo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Metrics/AbcSize:
108108
# Offense count: 3
109109
# Configuration parameters: CountComments.
110110
Metrics/BlockLength:
111-
Max: 134
111+
Max: 140
112112

113113
# Offense count: 2
114114
Metrics/BlockNesting:

README.rdoc

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ you can do so with a simple environment variable, instead of editing the
184184
-m, --show-migration Include the migration version number in the annotation
185185
-i, --show-indexes List the table's database indexes in the annotation
186186
-k, --show-foreign-keys List the table's foreign key constraints in the annotation
187+
--ck, --complete-foreign-keys
188+
Complete foreign key names in the annotation
187189
-s, --simple-indexes Concat the column's related indexes in the annotation
188190
--model-dir dir Annotate model files stored in dir rather than app/models, separate multiple dirs with commas
189191
--ignore-model-subdirects Ignore subdirectories of the models directory

bin/annotate

+6
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ OptionParser.new do |opts|
107107
ENV['show_foreign_keys'] = 'yes'
108108
end
109109

110+
opts.on('--ck',
111+
'--complete-foreign-keys', 'Complete foreign key names in the annotation') do
112+
ENV['show_foreign_keys'] = 'yes'
113+
ENV['show_complete_foreign_keys'] = 'yes'
114+
end
115+
110116
opts.on('-i', '--show-indexes',
111117
"List the table's database indexes in the annotation") do
112118
ENV['show_indexes'] = 'yes'

0 commit comments

Comments
 (0)