class Decidim::Sortitions::SortitionsType

Public Instance Methods

sortition(**args) click to toggle source
# File lib/decidim/api/sortitions_type.rb, line 21
def sortition(**args)
  Sortition.where(component: object).find_by(id: args[:id])
end
sortitions() click to toggle source
# File lib/decidim/api/sortitions_type.rb, line 13
def sortitions
  Sortition.where(component: object).includes(:component)
end