Commit 1c37d8f5

mo khan <mo@mokhan.ca>
2015-01-29 03:17:00
move distinct to fix api spec.
1 parent 51a0707
Changed files (2)
app
controllers
models
app/controllers/cakes_controller.rb
@@ -5,7 +5,7 @@ class CakesController < ApplicationController
   end
 
   def index
-    @cakes = @repository.search_with(params).page(page).per(per_page)
+    @cakes = @repository.search_with(params).distinct.page(page).per(per_page)
   end
 
   def show
app/models/creation/repository.rb
@@ -19,7 +19,7 @@ class Creation
     end
 
     def search_with(params)
-      all_matching(search_filters_for(params)).distinct
+      all_matching(search_filters_for(params))
     end
 
     private