Files
nairobi/app/components/admin/organizations/table_actions_component.rb
Javi Martín ccb7695056 Use a custom link_to method for table actions
This way we'll be able to change the behavior of these links without
changing the view nor affecting the rest of the application.
2020-11-03 14:58:02 +01:00

20 lines
371 B
Ruby

class Admin::Organizations::TableActionsComponent < ApplicationComponent
include TableActionLink
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