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

Version Path
tkh_content-0.10.4 app/controllers/blog_controller.rb
tkh_content-0.10.3 app/controllers/blog_controller.rb
tkh_content-0.10.2 app/controllers/blog_controller.rb
tkh_content-0.10.1 app/controllers/blog_controller.rb
tkh_content-0.10 app/controllers/blog_controller.rb
tkh_content-0.9.20 app/controllers/blog_controller.rb
tkh_content-0.9.19 app/controllers/blog_controller.rb
tkh_content-0.9.18 app/controllers/blog_controller.rb
tkh_content-0.9.17 app/controllers/blog_controller.rb
tkh_content-0.9.16 app/controllers/blog_controller.rb
tkh_content-0.9.15 app/controllers/blog_controller.rb
tkh_content-0.9.14 app/controllers/blog_controller.rb
tkh_content-0.9.13 app/controllers/blog_controller.rb