This way we'll be able to change the behavior of these links without changing the view nor affecting the rest of the application.
20 lines
371 B
Ruby
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
|