app/controllers/phcpresspro/frontend/articles_controller.rb in phcpresspro-5.7.4 vs app/controllers/phcpresspro/frontend/articles_controller.rb in phcpresspro-5.7.5

- old
+ new

@@ -3,18 +3,26 @@ module Phcpresspro class Frontend::ArticlesController < ApplicationController # Security & Filters layout '/layouts/phcpresspro/frontend.html.erb' + before_action :set_frontend_index, only: [:show, :edit, :update, :destroy] # Article Index def index - @article_index = Articles::Post.all + @article_indicies = Articles::Post.all end # Single Article Post def show - @article_single = Articles::Post.find(params[:id]) + @article_index = Articles::Post.find(params[:id]) + end + + private + + # Common Callbacks + def set_frontend_index + @article_index = Articles::Post.find(params[:id]) end end end