Skip to content

Commit 8f7beea

Browse files
Added --ignore-models option for skipping models annotation
1 parent ec05bf6 commit 8f7beea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bin/annotate

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ OptionParser.new do |opts|
128128
ENV['root_dir'] = dir
129129
end
130130

131+
opts.on('--ignore-models',
132+
"Don't annotate models") do |dir|
133+
ENV['ignore_models'] = 'yes'
134+
end
135+
131136
opts.on('--ignore-model-subdirects',
132137
"Ignore subdirectories of the models directory") do |dir|
133138
ENV['ignore_model_sub_dir'] = 'yes'

lib/annotate.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def self.include_routes?
108108
end
109109

110110
def self.include_models?
111-
true
111+
ENV['ignore_models'] !~ TRUE_RE
112112
end
113113

114114
def self.loaded_tasks=(val)

0 commit comments

Comments
 (0)