Class: Decidim::Surveys::SurveysType
- Inherits:
-
Core::ComponentType
- Object
- Core::ComponentType
- Decidim::Surveys::SurveysType
- Defined in:
- lib/decidim/api/surveys_type.rb
Instance Method Summary collapse
Instance Method Details
#survey(**args) ⇒ Object
19 20 21 |
# File 'lib/decidim/api/surveys_type.rb', line 19 def survey(**args) Survey.where(component: object).find_by(id: args[:id]) end |
#surveys ⇒ Object
11 12 13 |
# File 'lib/decidim/api/surveys_type.rb', line 11 def surveys Survey.where(component: object).includes(:component) end |