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.
22 23 24 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 22 def accepts_new_comments? commentable? && !feature.active_step_settings.comments_blocked end |
#commentable? ⇒ Boolean
Public: Overrides the ‘commentable?` Commentable concern method.
17 18 19 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 17 def commentable? feature.settings.comments_enabled? end |
#comments_have_alignment? ⇒ Boolean
Public: Overrides the ‘comments_have_alignment?` Commentable concern method.
27 28 29 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 27 def comments_have_alignment? true end |
#comments_have_votes? ⇒ Boolean
Public: Overrides the ‘comments_have_votes?` Commentable concern method.
32 33 34 |
# File 'decidim-results/app/models/decidim/results/result.rb', line 32 def comments_have_votes? true end |