Don't allow changing answers if the poll has started
Just like we did with questions.
This commit is contained in:
committed by
Javi Martín
parent
7a812a82e2
commit
3a6e99cb8c
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user