Thursday, June 04, 2026 1:11:13 AM
> application_component.rb
# frozen_string_literal: true

class ApplicationComponent < ViewComponent::Base
  attr_reader :current_user

  def initialize(current_user: nil)
    @current_user = current_user
  end

  def pundit_policy(scope)
    Pundit.policy(current_user, scope)
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2