Download app/controllers/static_controller.rb from denise-oneill-inbox-ru/Rails-8-API-Image-Processing: direct link, hf CLI and curl.
- Browser
- Download file 390 Bytes
-
https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/controllers/static_controller.rb
- Command line
-
hf download hf://spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/app/controllers/static_controller.rb
-
curl -L -o static_controller.rb https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/controllers/static_controller.rb
390 Bytes
| class StaticController < ApplicationController | |
| skip_before_action :authenticate_user!, only: [ :home ] | |
| def home | |
| @recent_posts = policy_scope(Post).publicly_visible | |
| .includes(:category, :tags, :user, :post_translations) | |
| .order(published_at: :desc) | |
| .limit(6) | |
| end | |
| end | |