From edf3f41288e902e77718820d649d48e653993889 Mon Sep 17 00:00:00 2001 From: Bryan Larsen Date: Thu, 22 Oct 2009 12:27:15 -0400 Subject: [PATCH] Fix so that Hobo can be included as a plugin to a generic Rails project without running any generators or anything. [#508 state:resolved] --- hobo/lib/hobo/model.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/hobo/lib/hobo/model.rb b/hobo/lib/hobo/model.rb index a7241681f..2bb520bd0 100644 --- a/hobo/lib/hobo/model.rb +++ b/hobo/lib/hobo/model.rb @@ -85,6 +85,7 @@ def self.all_models @models_loaded = true end + @model_names ||= Set.new # ...but only return the ones that registered themselves @model_names.map do |name| name.safe_constantize || (@model_names.delete name; nil)