lib/ultrasphinx/associations.rb in ultrasphinx-1.7 vs lib/ultrasphinx/associations.rb in ultrasphinx-1.8
- old
+ new
@@ -12,14 +12,15 @@
end
end
end
def get_association_model(klass, entry)
- get_association(klass, entry).class_name.constantize
- end
-
- def entry_identifies_association?(entry)
- entry['class_name'] || entry['association_name']
- end
-
+ association = get_association(klass, entry)
+ if association
+ association.class_name.constantize
+ else
+ entry['class_name'].constantize
+ end
+ end
+
end
end
\ No newline at end of file