Class: Decidim::Accountability::AccountabilityType

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

Instance Method Summary collapse

Instance Method Details

#result(**args) ⇒ Object



21
22
23
# File 'lib/decidim/api/accountability_type.rb', line 21

def result(**args)
  Result.where(component: object).find_by(id: args[:id])
end

#resultsObject



13
14
15
# File 'lib/decidim/api/accountability_type.rb', line 13

def results
  Result.where(component: object).includes(:component)
end