Class: Decidim::Proposals::ProposalsType

Inherits:
Api::Types::BaseObject
  • Object
show all
Defined in:
lib/decidim/api/proposals_type.rb

Instance Method Summary collapse

Instance Method Details

#proposal(id:) ⇒ Object



38
39
40
# File 'lib/decidim/api/proposals_type.rb', line 38

def proposal(id:)
  Decidim::Proposals::ProposalFinderHelper.new(model_class: Proposal).call(object, { id: }, context)
end

#proposals(filter: {}, order: {}) ⇒ Object



34
35
36
# File 'lib/decidim/api/proposals_type.rb', line 34

def proposals(filter: {}, order: {})
  Decidim::Proposals::ProposalListHelper.new(model_class: Proposal).call(object, { filter:, order: }, context)
end