diff --git a/lib/annotate/annotate_models.rb b/lib/annotate/annotate_models.rb index b0cfa98b8..90fe73625 100644 --- a/lib/annotate/annotate_models.rb +++ b/lib/annotate/annotate_models.rb @@ -399,7 +399,7 @@ def get_loaded_model(model_path) c.ancestors.respond_to?(:include?) and # to fix FactoryGirl bug, see https://github.com/ctran/annotate_models/pull/82 c.ancestors.include?(ActiveRecord::Base) end. - detect { |c| ActiveSupport::Inflector.underscore(c) == model_path } + detect { |c| ActiveSupport::Inflector.underscore(c.to_s) == model_path } end end