diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb index 043f2f66ba..08f08a41c3 100644 --- a/app/controllers/static_pages_controller.rb +++ b/app/controllers/static_pages_controller.rb @@ -1,5 +1,5 @@ class StaticPagesController < ApplicationController def home - @showcase = Product.all.sample(3) + @showcase = Product.find_instock.sample(3) end end diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb index 3fb7cf33ad..6a3fa6baeb 100644 --- a/app/views/static_pages/home.html.erb +++ b/app/views/static_pages/home.html.erb @@ -1,4 +1,4 @@ -

Featured :

+

Featured Products:

<% @showcase.each do |item| %>