diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 03801c2e1..00104bc6f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -108,7 +108,7 @@ Metrics/AbcSize: # Offense count: 3 # Configuration parameters: CountComments. Metrics/BlockLength: - Max: 134 + Max: 140 # Offense count: 2 Metrics/BlockNesting: diff --git a/README.rdoc b/README.rdoc index efd634586..be0a043b9 100644 --- a/README.rdoc +++ b/README.rdoc @@ -184,6 +184,8 @@ you can do so with a simple environment variable, instead of editing the -m, --show-migration Include the migration version number in the annotation -i, --show-indexes List the table's database indexes in the annotation -k, --show-foreign-keys List the table's foreign key constraints in the annotation + --ck, --complete-foreign-keys + Complete foreign key names in the annotation -s, --simple-indexes Concat the column's related indexes in the annotation --model-dir dir Annotate model files stored in dir rather than app/models, separate multiple dirs with commas --ignore-model-subdirects Ignore subdirectories of the models directory diff --git a/bin/annotate b/bin/annotate index a5acf0818..6b45dd9d9 100755 --- a/bin/annotate +++ b/bin/annotate @@ -107,6 +107,12 @@ OptionParser.new do |opts| ENV['show_foreign_keys'] = 'yes' end + opts.on('--ck', + '--complete-foreign-keys', 'Complete foreign key names in the annotation') do + ENV['show_foreign_keys'] = 'yes' + ENV['show_complete_foreign_keys'] = 'yes' + end + opts.on('-i', '--show-indexes', "List the table's database indexes in the annotation") do ENV['show_indexes'] = 'yes'