Sha256: aea70998a7ade94dc5ed6a9b726532ad169b52ab27ebd07471c73df763f52e61
Contents?: true
Size: 327 Bytes
Versions: 4
Compression:
Stored size: 327 Bytes
Contents
class NewsController < PostsController def index @news = News.published.order('date DESC').paginate(page: params[:page],per_page: 10) end def show @news = News.find(params[:id]) @other_news = News.published.not_in(:id => @news.id).order('date DESC').paginate(page: params[:page], per_page: 10) end end
Version data entries
4 entries across 4 versions & 2 rubygems