Skip to content

Commit 8057cd5

Browse files
committed
Merge pull request #243 from mafernando/patch-1
Check if model has skip tag in annotate_model_file
2 parents bc2662b + ba5d1cc commit 8057cd5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ def do_annotations(options={})
477477

478478
def annotate_model_file(annotated, file, header, options)
479479
begin
480+
return false if (/# -\*- SkipSchemaAnnotations.*/ =~ (File.exist?(file) ? File.read(file) : '') )
480481
klass = get_model_class(file)
481482
if klass && klass < ActiveRecord::Base && !klass.abstract_class? && klass.table_exists?
482483
if annotate(klass, file, header, options)

0 commit comments

Comments
 (0)