motion-prime/models/finder.rb in motion-prime-0.2.1 vs motion-prime/models/finder.rb in motion-prime-0.3.0

- old
+ new

@@ -1,7 +1,9 @@ module MotionPrime module ModelFinderMethods + attr_accessor :bare_class + # Find all models # # @return [Array] array of models def all(*args) return [] unless self.store @@ -139,10 +141,11 @@ searchResult.last if searchResult end def bare_class_name - self.to_s.split("::").last + subject = @bare_class || self + subject.to_s.split("::").last end private def expressions_with_options(options) expressions = []