Permalink
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 263 Bytes
class PageController < ApplicationController
caches_page :index
cache_sweeper :site_sweeper
def index
@categories = Category.all.sort
@articles = Article.find(:all, include: [:category, :tags])
@articles.sort_by(&:updated_at).reverse
end
end