Rails-8-API-Image-Processing / app /controllers /static_controller.rb
denise-oneill-inbox-ru's picture
D8 staging from 92665ef4298ecff6735b080ff7901f2c19f719a7
5010ad7 verified
Raw History Blame Contribute Delete
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