vendor/plugins/news/app/controllers/news_items_controller.rb in refinerycms-0.9.6.7 vs vendor/plugins/news/app/controllers/news_items_controller.rb in refinerycms-0.9.6.8
- old
+ new
@@ -4,17 +4,17 @@
before_filter :find_news_item, :only => [:show]
protected
def find_latest_news_items
- @news_items = NewsItem.latest
+ @news_items = NewsItem.latest # 10 items
end
def find_news_item
- @news_item = NewsItem.find(params[:id], :conditions => ["publish_date < ?", Time.now])
+ @news_item = NewsItem.published.find(params[:id])
end
def find_page
@page = Page.find_by_link_url("/news", :include => [:parts, :slugs])
end
-end
+end
\ No newline at end of file