Class: HomeController

Inherits:
Spree::BaseController
  • Object
show all
Defined in:
app/controllers/home_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
# File 'app/controllers/home_controller.rb', line 4

def index
  @taxons = Rails.cache.fetch('homepage-taxons', :expires_in => LONG_INTERVAL) do
    home_taxonomy = get_taxonomies.find{|t| t.show_on_homepage? }
    home_taxonomy ? home_taxonomy.root.children : []
  end
end