Class: Decidim::Problems::ProblemsType

Inherits:
Api::Types::BaseObject
  • Object
show all
Defined in:
app/types/decidim/problems/problems_type.rb

Instance Method Summary collapse

Instance Method Details

#problem(**args) ⇒ Object



21
22
23
# File 'app/types/decidim/problems/problems_type.rb', line 21

def problem(**args)
  ProblemsTypeHelper.base_scope(object).find_by(id: args[:id])
end

#problemsObject



13
14
15
# File 'app/types/decidim/problems/problems_type.rb', line 13

def problems
  ProblemsTypeHelper.base_scope(object).includes(:component)
end