simple_crm/app/controllers/admin/article_controller.rb

34 lines
423 B
Ruby

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