Class: Decidim::Surveys::SurveysType
- Inherits:
-
Api::Types::BaseObject
- Object
- Api::Types::BaseObject
- Decidim::Surveys::SurveysType
- Defined in:
- lib/decidim/api/surveys_type.rb
Instance Method Summary collapse
Instance Method Details
#survey(**args) ⇒ Object
21 22 23 |
# File 'lib/decidim/api/surveys_type.rb', line 21 def survey(**args) Survey.where(component: object).find_by(id: args[:id]) end |
#surveys ⇒ Object
13 14 15 |
# File 'lib/decidim/api/surveys_type.rb', line 13 def surveys Survey.where(component: object).includes(:component) end |