Sha256: 7576107b8284371285c595e5d4cb1dd0d16f5b53d4e6ce3d757a3b9800758fb5

Contents?: true

Size: 547 Bytes

Versions: 40

Compression:

Stored size: 547 Bytes

Contents

module Virgo
  class CategoriesController < ApplicationController
    caches_action :show, if: ->{ current_user.nil? && flash.empty? },
                  cache_path: ->(o){ "#{deploy_key}/#{site_key}/categories/show/#{params[:id]}/#{category_timestamp(params[:id])}/#{params[:page]}" }

    def show
      set_category

      @posts = @category.posts.order(publish_at: :desc).page(params[:page])

      render layout: 'virgo/posts'
    end

    private

    def set_category
      @category = Category.friendly.find(params[:id])
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
virgo-0.3.17 app/controllers/virgo/categories_controller.rb
virgo-0.3.16 app/controllers/virgo/categories_controller.rb
virgo-0.3.15 app/controllers/virgo/categories_controller.rb
virgo-0.3.14 app/controllers/virgo/categories_controller.rb
virgo-0.3.13 app/controllers/virgo/categories_controller.rb
virgo-0.3.12 app/controllers/virgo/categories_controller.rb
virgo-0.3.11 app/controllers/virgo/categories_controller.rb
virgo-0.3.10 app/controllers/virgo/categories_controller.rb
virgo-0.3.9 app/controllers/virgo/categories_controller.rb
virgo-0.3.8 app/controllers/virgo/categories_controller.rb
virgo-0.3.7 app/controllers/virgo/categories_controller.rb
virgo-0.3.6 app/controllers/virgo/categories_controller.rb
virgo-0.3.4 app/controllers/virgo/categories_controller.rb
virgo-0.3.3 app/controllers/virgo/categories_controller.rb
virgo-0.3.2 app/controllers/virgo/categories_controller.rb
virgo-0.3.1 app/controllers/virgo/categories_controller.rb
virgo-0.3 app/controllers/virgo/categories_controller.rb
virgo-0.2.9 app/controllers/virgo/categories_controller.rb
virgo-0.2.8 app/controllers/virgo/categories_controller.rb
virgo-0.2.7 app/controllers/virgo/categories_controller.rb