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 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::Budgets::Workflows::Base

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) # rubocop:disable Lint/UnusedMethodArgument
  !voted?(resource)
end