Class: AuthorsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/authors_controller.rb

Overview

Displaying post authors

Instance Method Summary collapse

Instance Method Details

#indexObject

get /authors



8
9
10
# File 'app/controllers/authors_controller.rb', line 8

def index
  @collection = EditorialMember.list_for_visitors
end

#showObject

get /authors/:slug



13
14
15
16
17
18
19
# File 'app/controllers/authors_controller.rb', line 13

def show
  @collection = Post.owned_by(@entity.user).page_for_visitors(current_page)
  respond_to do |format|
    format.html
    format.json { render('posts/index') }
  end
end