15 lines
285 B
Ruby
15 lines
285 B
Ruby
class Admin::Poll::Questions::Answers::TableActionsComponent < ApplicationComponent
|
|
attr_reader :answer
|
|
delegate :can?, to: :helpers
|
|
|
|
def initialize(answer)
|
|
@answer = answer
|
|
end
|
|
|
|
private
|
|
|
|
def actions
|
|
[:edit].select { |action| can?(action, answer) }
|
|
end
|
|
end
|