app/models/impressionizer/impressionable.rb in impressionizer-0.0.2 vs app/models/impressionizer/impressionable.rb in impressionizer-0.0.3
- old
+ new
@@ -6,14 +6,14 @@
include InstanceMethods
end
module ClassMethods
def most_impressions
- self.all.select{|obj| obj.impression_count > 0}.sort_by{|obj| -obj.impression_count}
+ self.scoped.select{|obj| obj.impression_count > 0}.sort_by{|obj| -obj.impression_count}
end
def most_unique_impressions
- self.all.select{|obj| obj.impression_count > 0}.sort_by{|obj| -obj.unique_impression_count}
+ self.scoped.select{|obj| obj.impression_count > 0}.sort_by{|obj| -obj.unique_impression_count}
end
end
module InstanceMethods
def impressionable?
\ No newline at end of file