Class: Decidim::ActionDelegator::Setting
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::ActionDelegator::Setting
- Defined in:
- app/models/decidim/action_delegator/setting.rb
Overview
Contains the delegation settings of an election. Rather than a single attribute here a setting is the record itself: a bunch of configuration values.
Instance Method Summary collapse
- #destroyable? ⇒ Boolean
- #editable? ⇒ Boolean
- #email_required? ⇒ Boolean
- #phone_required? ⇒ Boolean
- #presenter ⇒ Object
Instance Method Details
#destroyable? ⇒ Boolean
42 |
# File 'app/models/decidim/action_delegator/setting.rb', line 42 def destroyable? = participants.empty? && ponderations.empty? && delegations.empty? |
#editable? ⇒ Boolean
40 |
# File 'app/models/decidim/action_delegator/setting.rb', line 40 def editable? = active? |
#email_required? ⇒ Boolean
46 |
# File 'app/models/decidim/action_delegator/setting.rb', line 46 def email_required? = verify_with_email? || verify_with_both? |
#phone_required? ⇒ Boolean
44 |
# File 'app/models/decidim/action_delegator/setting.rb', line 44 def phone_required? = verify_with_phone? || verify_with_both? |
#presenter ⇒ Object
48 49 50 |
# File 'app/models/decidim/action_delegator/setting.rb', line 48 def presenter Decidim::ActionDelegator::SettingPresenter.new(self) end |