Skip to content

Commit

Permalink
Merge pull request #243 from mafernando/patch-1
Browse files Browse the repository at this point in the history
Check if model has skip tag in annotate_model_file
  • Loading branch information
ctran committed Apr 10, 2015
2 parents bc2662b + ba5d1cc commit 8057cd5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/annotate/annotate_models.rb
Expand Up @@ -477,6 +477,7 @@ def do_annotations(options={})

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

0 comments on commit 8057cd5

Please sign in to comment.