Class: Decidim::Results::Result
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Results::Result
- Includes:
- Comments::Commentable, HasCategory, HasFeature, HasReference, HasScope, Decidim::Resourceable
- Defined in:
- decidim-results/app/models/decidim/results/result.rb
Overview
The data store for a Result in the Decidim::Results component. It stores a title, description and any other useful information to render a custom result.
Instance Method Summary collapse
-
#accepts_new_comments? ⇒ Boolean
Public: Overrides the ‘accepts_new_comments?` Commentable concern method.
-
#commentable? ⇒ Boolean
Public: Overrides the ‘commentable?` Commentable concern method.
-
#comments_have_alignment? ⇒ Boolean
Public: Overrides the ‘comments_have_alignment?` Commentable concern method.
-
#comments_have_votes? ⇒ Boolean
Public: Overrides the ‘comments_have_votes?` Commentable concern method.
Instance Method Details
#accepts_new_comments? ⇒ Boolean
Public: Overrides the ‘accepts_new_comments?` Commentable concern method.
23 24 25 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 23 def accepts_new_comments? commentable? && !feature.active_step_settings.comments_blocked end |
#commentable? ⇒ Boolean
Public: Overrides the ‘commentable?` Commentable concern method.
18 19 20 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 18 def commentable? feature.settings.comments_enabled? end |
#comments_have_alignment? ⇒ Boolean
Public: Overrides the ‘comments_have_alignment?` Commentable concern method.
28 29 30 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 28 def comments_have_alignment? true end |
#comments_have_votes? ⇒ Boolean
Public: Overrides the ‘comments_have_votes?` Commentable concern method.
33 34 35 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 33 def comments_have_votes? true end |