lib/model_discovery/discovery.rb in model_discovery-0.2.3 vs lib/model_discovery/discovery.rb in model_discovery-0.2.4

- old
+ new

@@ -5,10 +5,10 @@ # Discover all model files in gem files and load them all_gems.each do |gem| if gem.groups.include? Rails.env.to_sym or gem.groups.include? :default puts "Gem name: #{gem.name}" - spec = Gem::Specification.find_by(name: gem.name) + spec = Gem::Specification.find_by_name gem.name discover spec.gem_dir end end # Discover models in current rails app and load them