Class: Whatson::CategoriesController

Inherits:
WhatsonController show all
Defined in:
app/controllers/whatson/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



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

def show
  @category = WhatsonCategory.find(params[:id])
  @whatson_posts = @category.posts.live.includes(:comments, :categories).paginate({
    :page => params[:page],
    :per_page => RefinerySetting.find_or_set(:whatson_posts_per_page, 10)
  })
end