Sha256: 25c6479ad5071efc3d05d6e1367b65e0416455d4e02f761d07e398930f73fe91
Contents?: true
Size: 428 Bytes
Versions: 8
Compression:
Stored size: 428 Bytes
Contents
class NewsItemsController < ApplicationController before_filter :find_latest_news_items, :find_page before_filter :find_news_item, :only => [:show] protected def find_latest_news_items @news_items = NewsItem.latest # 10 items end def find_news_item @news_item = NewsItem.published.find(params[:id]) end def find_page @page = Page.find_by_link_url("/news", :include => [:parts, :slugs]) end end
Version data entries
8 entries across 8 versions & 2 rubygems