Sha256: 6dc78e47cf50f80013ebbe1227fe6e1e78b44d6580b02bbee64c9ea2c7d2412a
Contents?: true
Size: 679 Bytes
Versions: 40
Compression:
Stored size: 679 Bytes
Contents
module Virgo class PageModulesController < ApplicationController caches_action :popular_posts, expires_in: 3.minutes, cache_path: ->(o){ "#{deploy_key}/#{site_key}/page_modules/popular_posts/#{params[:category_id]}/#{params[:page]}" } def popular_posts @category = Category.friendly.find(params[:category_id]) if params[:category_id].present? @tabbed = @category.present? ? true : false @tab = @category.present? ? :category : :all render json: { html: render_content(partial: '/virgo/page_modules/popular_posts', locals: {category: @category, tab: @tab, tabbed: @tabbed}) } end end end
Version data entries
40 entries across 40 versions & 1 rubygems