Class: Parlez::PostsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/parlez/posts_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
# File 'app/controllers/parlez/posts_controller.rb', line 4

def index
  @posts = Parlez::Post.published.order('published_at DESC').limit(Parlez::Engine.config.posts_per_page)
end

#showObject



8
9
10
11
# File 'app/controllers/parlez/posts_controller.rb', line 8

def show
  @post = Parlez::Post.find(params[:id])
  @comments = @post.comments.ham.order('updated_at DESC')
end