Class: Crowdblog::AuthorsController

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

Instance Method Summary collapse

Methods inherited from Controller

#authorize!

Instance Method Details

#indexObject



4
5
6
# File 'app/controllers/crowdblog/authors_controller.rb', line 4

def index
  @authors = User.includes(:authored_posts).sort {|a,b| b.authored_posts.count <=> a.authored_posts.count}
end