Sha256: a59b8bb9c1a5571b53d67c6fcd1a05c30e7620c02a8b6bcea2cec211e9b42b9b
Contents?: true
Size: 495 Bytes
Versions: 13
Compression:
Stored size: 495 Bytes
Contents
class BlogController < ApplicationController def index @posts = Page.for_blog.published.order('published_at desc').paginate(:page => params[:page], :per_page => 20) respond_to do |format| format.html { render :layout => 'blog' } format.atom end end def by_tag @tag = Tag.where('name = ?', params[:id]).first @posts = @tag.pages.published.order('published_at desc').paginate(:page => params[:page], :per_page => 20) render :layout => 'blog' end end
Version data entries
13 entries across 13 versions & 1 rubygems