motion-prime/models/finder.rb in motion-prime-0.2.0 vs motion-prime/models/finder.rb in motion-prime-0.2.1
- old
+ new
@@ -2,9 +2,11 @@
module ModelFinderMethods
# Find all models
#
# @return [Array] array of models
def all(*args)
+ return [] unless self.store
+
if args[0].is_a?(Hash)
sort_options = args[0][:sort] || {}
else
sort_options = {}
end