Sha256: a9457dd4b42144feba6c312ad69161922460f21d3bfdff915627908628d89d34
Contents?: true
Size: 453 Bytes
Versions: 7
Compression:
Stored size: 453 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 end def find_news_item @news_item = NewsItem.find(params[:id], :conditions => ["publish_date < ?", Time.now]) end def find_page @page = Page.find_by_link_url("/news", :include => [:parts, :slugs]) end end
Version data entries
7 entries across 7 versions & 1 rubygems