lib/locabulary/item.rb in locabulary-0.6.2 vs lib/locabulary/item.rb in locabulary-0.7.1

- old
+ new

@@ -41,10 +41,10 @@ # @return [Locabulary::Items::Base] def self.class_to_instantiate(options = {}) predicate_name = options.fetch(:predicate_name) possible_class_name_for_predicate_name = predicate_name.singularize.classify begin - Items.const_get(possible_class_name_for_predicate_name) + "Locabulary::Items::#{possible_class_name_for_predicate_name}".constantize rescue NameError Items::Base end end end