Sha256: c738a782680cac06ed45c0779a8b0e967aa4e0cd9ca264ab82c2ed78616fd18d

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

require_dependency "bigmouth/application_controller"

module Bigmouth
  class ArticlesController < ApplicationController

    layout "bigmouth/default"

    before_action :set_article, only: %i(show)

    # GET /articles
    def index
      @articles = Article.all
      render :index, layout: Bigmouth.config.layout
    end

    # GET /articles/1
    def show
      render :show, layout: Bigmouth.config.layout
    end

    private

      # Use callbacks to share common setup or constraints between actions.
      def set_article
        @article = Article.find(params[:id])
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bigmouth-0.0.2 app/controllers/bigmouth/articles_controller.rb