lib/modaldiagrams/modaldiagrams.rb in modaldiagrams-1.1.0 vs lib/modaldiagrams/modaldiagrams.rb in modaldiagrams-1.1.1

- old
+ new

@@ -223,19 +223,19 @@ # :only_app_tree_files # But return nil for files not in the app directory tree (app, vendor...) def dbmodels(options={}) models_dir = 'app/models' if Rails.respond_to?(:application) - models_dir = Rails.application.paths[models_dir] + model_dirs = Rails.application.paths[models_dir] + else + model_dirs = [models_dir] end models_dir = Rails.root.join(models_dir) + model_dirs = model_dirs.map{|d| Rails.root.join(d)} if options[:all_models] # Include also models from plugins model_dirs = $:.grep(/\/models\/?\Z/) - else - # Only main application models - model_dirs = [models_dir] end models = [] files = {} model_dirs.each do |base|