OSDN Git Service

fix extend for profiler
[pettanr/pettanr.git] / lib / locmare / list_group / list / base.rb
index 7e71f68..9855fd8 100644 (file)
@@ -91,6 +91,21 @@ module Locmare
         Kaminari.paginate_array(Array.new(c, nil)).page(offset).per(page_size)
       end
       
+      def boost_manifests
+        @model.my_peta.boost.select do |boost_name, boost_manifest|
+          boost_manifest.level == 'show'
+        end
+      end
+      
+      def boost items
+        manifests = self.boost_manifests
+        items.each do |item|
+          manifests.each do |boost_manifest|
+            item.boost_manifest
+          end
+        end
+      end
+      
       def open operators, options
         page = self.page_number(options[:page]) 
         page_size = self.page_size options[:page_size]
@@ -98,6 +113,7 @@ module Locmare
         items = self.items operators, options, offset, page_size
         count = self.count operators, options
         pg = self.paginate count, offset, page_size
+        self.boost items
         ListResult.new items, pg
       end