File size: 466 Bytes
5010ad7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | module Admin
class DashboardController < AdminController
def index
@post_count = Post.count
@published_count = Post.published.count
@user_count = User.count
@comment_count = Comment.kept.count
@category_count = Category.count
@tag_count = Tag.count
@recent_posts = Post.order(created_at: :desc).limit(5)
@recent_comments = Comment.kept.includes(:user, :post).order(created_at: :desc).limit(5)
end
end
end
|