Class: Decidim::Lausanne::Budgets::Workflows::All

Inherits:
Base
  • Object
show all
Defined in:
lib/decidim/lausanne/budgets/workflows/all.rb

Overview

This Workflow allows users to vote in all budgets.

Instance Attribute Summary

Attributes inherited from Base

#budgets_component, #user

Instance Method Summary collapse

Methods inherited from Base

#allowed, #budgets, #discardable, #highlighted, #initialize, #limit_reached?, #progress, #progress?, #single, #single?, #status, #voted, #voted?

Constructor Details

This class inherits a constructor from Decidim::Lausanne::Budgets::Workflows::Base

Instance Method Details

#highlighted?(_resource) ⇒ Boolean

No budget is highlighted for this workflow.

Returns:

  • (Boolean)


10
11
12
# File 'lib/decidim/lausanne/budgets/workflows/all.rb', line 10

def highlighted?(_resource)
  false
end

#vote_allowed?(resource, _consider_progress: true) ⇒ Boolean

Users can vote in all budgets with this workflow.

Returns:

  • (Boolean)


15
16
17
# File 'lib/decidim/lausanne/budgets/workflows/all.rb', line 15

def vote_allowed?(resource, _consider_progress: true)
  !voted?(resource)
end