We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e80ed2 commit a89c8d9Copy full SHA for a89c8d9
lib/annotate/annotate_models.rb
@@ -370,7 +370,7 @@ def get_model_files(options)
370
# in subdirectories without namespacing.
371
def get_model_class(file)
372
# this is for non-rails projects, which don't get Rails auto-require magic
373
- require File.expand_path("#{model_dir}/#{file}") unless Module.const_defined?(:Rails)
+ require File.expand_path("#{model_dir}/#{file}")
374
model_path = file.gsub(/\.rb$/, '')
375
get_loaded_model(model_path) || get_loaded_model(model_path.split('/').last)
376
end
0 commit comments