Class: Decidim::Accountability::AccountabilityType

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

Instance Method Summary collapse

Instance Method Details

#result(**args) ⇒ Object


21
22
23
# File 'decidim-accountability/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 'decidim-accountability/lib/decidim/api/accountability_type.rb', line 13

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