Sha256: 1df93668572bfa367310f844be070cacf1552e9957d56b51f0946a89918087ec

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

require_dependency "knowledge_base/application_controller"

module KnowledgeBase
  class ArticlesController < ApplicationController
    before_action :set_category

    def show
      @article = @category.articles.friendly.find params[:id]
    end

    private

    def set_category
      @category = Category.friendly.find params[:category_id]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
knowledge_base-0.0.3 app/controllers/knowledge_base/articles_controller.rb