diff --git a/lib/annotate/annotate_models.rb b/lib/annotate/annotate_models.rb index 3786d221f..978e3785b 100644 --- a/lib/annotate/annotate_models.rb +++ b/lib/annotate/annotate_models.rb @@ -477,6 +477,8 @@ def do_annotations(options={}) def annotate_model_file(annotated, file, header, options) begin + old_content = File.read(file) # Check model file for SkipSchemaAnnotations + return false if(old_content =~ /# -\*- SkipSchemaAnnotations.*\n/) klass = get_model_class(file) if klass && klass < ActiveRecord::Base && !klass.abstract_class? && klass.table_exists? if annotate(klass, file, header, options)