Commit 8057cd50 by Cuong Tran

Merge pull request #243 from mafernando/patch-1

Check if model has skip tag in annotate_model_file
parents bc2662b4 ba5d1cc0
......@@ -477,6 +477,7 @@ module AnnotateModels
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment