Class: Enki::PostsController

Inherits:
BaseController show all
Defined in:
app/controllers/enki/posts_controller.rb

Instance Method Summary collapse

Methods included from HostHelper

#render_enki

Methods included from UrlHelper

#author_link, #post_comments_path, #post_path

Methods included from TagHelper

#linked_tag_list

Methods included from PostsHelper

#more_content?

Methods included from PageTitleHelper

#archives_title, #html_title, #page_title, #post_title, #posts_title

Methods included from NavigationHelper

#category_links_for_navigation, #class_for_tab, #page_links_for_navigation

Methods included from FormHelper

#admin_form_for

Methods included from DateHelper

#format_comment_date, #format_month, #format_post_date

Methods included from ApplicationHelper

#author, #comments?, #format_comment_error, #paginated, #tags?

Instance Method Details

#indexObject



3
4
5
6
7
8
9
10
11
# File 'app/controllers/enki/posts_controller.rb', line 3

def index
  @tag = params[:tag]
  @posts = Post.find_recent(:tag => @tag, :include => :tags)

  respond_to do |format|
    format.html
    format.atom { render :layout => false }
  end
end

#showObject



13
14
15
16
# File 'app/controllers/enki/posts_controller.rb', line 13

def show
  @post = Post.find_by_permalink(*([:year, :month, :day, :slug].collect {|x| params[x] } << {:include => includes_for_show}))
  @comment = Comment.new if comments?
end