Class: Hitchens::PostsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_ability

Instance Method Details

#indexObject



5
6
7
8
# File 'app/controllers/hitchens/posts_controller.rb', line 5

def index
  @posts = @posts.page(params[:page]).per_page(Hitchens.posts_per_page)
  @posts = PostDecorator.decorate @posts
end

#showObject



10
11
12
# File 'app/controllers/hitchens/posts_controller.rb', line 10

def show
  @post = PostDecorator.decorate @post
end