Skip to content

Commit 70e82ad

Browse files
committed
Merge pull request #193 from ekampp/develop
Coerce class to string for comparison
2 parents 08a37ab + 92190ef commit 70e82ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def get_loaded_model(model_path)
399399
c.ancestors.respond_to?(:include?) and # to fix FactoryGirl bug, see https://github.com/ctran/annotate_models/pull/82
400400
c.ancestors.include?(ActiveRecord::Base)
401401
end.
402-
detect { |c| ActiveSupport::Inflector.underscore(c) == model_path }
402+
detect { |c| ActiveSupport::Inflector.underscore(c.to_s) == model_path }
403403
end
404404
end
405405

0 commit comments

Comments
 (0)