diff --git a/app/controllers/news_items_controller.rb b/app/controllers/news_items_controller.rb index f871cbaa..75d58c81 100644 --- a/app/controllers/news_items_controller.rb +++ b/app/controllers/news_items_controller.rb @@ -1,9 +1,15 @@ class NewsItemsController < ApplicationController def index - @news_items = NewsItem.published.to_a + @news_items = news_item_scope.to_a end def show - @news_item = NewsItem.published.find(params[:id]) + @news_item = news_item_scope.find(params[:id]) + end + + private + + def news_item_scope + NewsItem.published end end