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

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

Overview

This Workflow allows users to vote in all budgets.

Instance Method Summary collapse

Instance Method Details

#highlighted?(_resource) ⇒ Boolean

No budget is highlighted for this workflow.

Returns:

  • (Boolean)


9
10
11
# File 'decidim-budgets/lib/decidim/budgets/workflows/all.rb', line 9

def highlighted?(_resource)
  false
end

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

Users can vote in all budgets with this workflow.

Returns:

  • (Boolean)


14
15
16
# File 'decidim-budgets/lib/decidim/budgets/workflows/all.rb', line 14

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