Class: Decidim::Challenges::Challenge
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Challenges::Challenge
- Includes:
- FilterableResource, Forms::HasQuestionnaire, HasComponent, HasUploadValidations, Loggable, Publicable, Randomable, Resourceable, ScopableResource, Searchable, Traceable, TranslatableAttributes
- Defined in:
- app/models/decidim/challenges/challenge.rb
Overview
The data store for a Challenge in the Decidim::Challenges component.
Constant Summary collapse
- VALID_STATES =
[:proposal, :execution, :finished].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ransackable_scopes(_auth_object = nil) ⇒ Object
59 60 61 |
# File 'app/models/decidim/challenges/challenge.rb', line 59 def self.ransackable_scopes(_auth_object = nil) [:with_any_state, :search_text_cont, :with_any_sdgs_codes, :with_any_scope, :related_to] end |
Instance Method Details
#published? ⇒ Boolean
75 76 77 |
# File 'app/models/decidim/challenges/challenge.rb', line 75 def published? published_at.present? end |
#remove_card_image ⇒ Object
79 |
# File 'app/models/decidim/challenges/challenge.rb', line 79 def remove_card_image; end |