Adapt 'show' view for open questions without options
- Prevent creating options for open questions - Skip rendering the options table when none exist
This commit is contained in:
@@ -61,6 +61,10 @@ class Poll::Question < ApplicationRecord
|
||||
votation_type.nil? || votation_type.unique?
|
||||
end
|
||||
|
||||
def accepts_options?
|
||||
votation_type.nil? || votation_type.accepts_options?
|
||||
end
|
||||
|
||||
def max_votes
|
||||
if multiple?
|
||||
votation_type.max_votes
|
||||
|
||||
Reference in New Issue
Block a user