Files
nairobi/app/components/admin/organizations/table_actions_component.rb
Javi Martín 1537f25739 Extract component for organization actions
We remove duplication by doing so, and now we only need to add the call
do render Admin::TableActionsComponent once.
2020-10-21 13:19:52 +02:00

19 lines
345 B
Ruby

class Admin::Organizations::TableActionsComponent < ApplicationComponent
delegate :can?, to: :controller
attr_reader :organization
def initialize(organization)
@organization = organization
end
private
def can_verify?
can? :verify, organization
end
def can_reject?
can? :reject, organization
end
end