Class: Decidim::Pages::Page
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Pages::Page
- Includes:
- Comments::Commentable
- Defined in:
- app/models/decidim/pages/page.rb
Overview
The data store for a Page in the Decidim::Pages component. It stores a title, description and any other useful information to render a custom page.
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.
21 22 23 |
# File 'app/models/decidim/pages/page.rb', line 21 def accepts_new_comments? commentable? && !feature.active_step_settings.comments_blocked end |
#commentable? ⇒ Boolean
Public: Overrides the ‘commentable?` Commentable concern method.
16 17 18 |
# File 'app/models/decidim/pages/page.rb', line 16 def commentable? feature.settings.comments_enabled? end |
#comments_have_alignment? ⇒ Boolean
Public: Overrides the ‘comments_have_alignment?` Commentable concern method.
26 27 28 |
# File 'app/models/decidim/pages/page.rb', line 26 def comments_have_alignment? true end |
#comments_have_votes? ⇒ Boolean
Public: Overrides the ‘comments_have_votes?` Commentable concern method.
31 32 33 |
# File 'app/models/decidim/pages/page.rb', line 31 def comments_have_votes? true end |