Download app/controllers/admin/dashboard_controller.rb from denise-oneill-inbox-ru/Rails-8-API-Image-Processing: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/controllers/admin/dashboard_controller.rb
- Command line
-
hf download hf://spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/app/controllers/admin/dashboard_controller.rb
-
curl -L -o dashboard_controller.rb https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/controllers/admin/dashboard_controller.rb
466 Bytes
| 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 | |