Commit 48e013e

mo khan <mo@mokhan.ca>
2013-06-15 14:07:52
grab top 10 cakes
1 parent 9ab3bca
Changed files (1)
app
app/controllers/cakes_controller.rb
@@ -2,7 +2,7 @@ class CakesController < ApplicationController
   before_filter :authenticate_user!, except: [:index, :show]
 
   def index
-    @cakes = Cake.all(include: :category)
+    @cakes = Cake.limit(10).order(:updated_at).all(include: :category)
   end
 
   def n_plus_one