Sha256: 6cc92b77ac20ddd367eb9fc417a4f468c3a40e6acc677f799dc69ef41b1855cc

Contents?: true

Size: 836 Bytes

Versions: 28

Compression:

Stored size: 836 Bytes

Contents

module Knitkit
  class BlogsController < BaseController
    PER_PAGE = 10
  
    def index
      @blog = Blog.find(@website_section.id)
      params[:use_route] = 'blogs'
    
      @contents = @blog.find_published_blog_posts(@active_publication).paginate(:page => params[:page], :per_page => PER_PAGE)
    end

    def tag
      @blog = Blog.find(@website_section.id)
      @tag = ActsAsTaggableOn::Tag.find(params[:tag_id])
      params[:use_route] = 'blog_tag'

      @contents = @blog.find_published_blog_posts_with_tag(@active_publication, @tag).paginate(:page => params[:page], :per_page => PER_PAGE)
    
      render :index
    end

    def show
      @blog = Blog.find(@website_section.id)
      @published_content = @blog.find_published_blog_post(@active_publication, params[:id])
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
knitkit-3.2.0 app/controllers/knitkit/blogs_controller.rb
knitkit-3.0.0 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.15 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.14 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.13 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.12 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.11 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.10 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.9 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.8 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.7 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.6 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.5 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.4 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.3 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.2 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.1 app/controllers/knitkit/blogs_controller.rb
knitkit-2.1.0 app/controllers/knitkit/blogs_controller.rb
knitkit-2.0.11 app/controllers/knitkit/blogs_controller.rb
knitkit-2.0.10 app/controllers/knitkit/blogs_controller.rb