demarches-normaliennes/app/components/profile/api_token_card_component.rb

12 lines
218 B
Ruby
Raw Normal View History

class Profile::APITokenCardComponent < ApplicationComponent
private
def render?
current_administrateur.present?
end
def api_tokens
current_administrateur.api_tokens.order(created_at: :desc)
end
end