Sha256: 8737c36530a9d97a92b5287a7c10107f0a396585a4181db7a3e858bb6464b2e7

Contents?: true

Size: 485 Bytes

Versions: 5

Compression:

Stored size: 485 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.order('published_at desc').paginate(:page => params[:page], :per_page => 20)
    render :layout => 'blog'
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tkh_content-0.9.12 app/controllers/blog_controller.rb
tkh_content-0.9.11 app/controllers/blog_controller.rb
tkh_content-0.9.10 app/controllers/blog_controller.rb
tkh_content-0.9.9 app/controllers/blog_controller.rb
tkh_content-0.9.8 app/controllers/blog_controller.rb