Sha256: eef2ba94c41aab3b78b2b4f8c9187840fd7a73fef2f96f7f5512459fed6735f1
Contents?: true
Size: 606 Bytes
Versions: 4
Compression:
Stored size: 606 Bytes
Contents
class HelpCenter::SupportCategoriesController < HelpCenter::ApplicationController before_action :set_category def index @support_threads = SupportThread.where(support_category: @category) if @category.present? @support_threads = @support_threads.pinned_first.sorted.includes(:user, :support_category).paginate(per_page: 10, page: page_number) render "help_center/support_threads/index" end private def set_category @category = SupportCategory.friendly.find(params[:id]) rescue ActiveRecord::RecordNotFound redirect_to help_center.support_threads_path end end
Version data entries
4 entries across 4 versions & 1 rubygems