class Admin::ArticleController < ApplicationController before_action :authenticate_admin! layout 'admin' def index @articles = Article.all end def show @article = Article.find(params[:id]) @all_pages = AllPage.where('article_id = ? AND type_of = 3', @article.id).order('updated_at DESC') end def new end def create end def edit end def update end def destroy end end