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(id:) ⇒ Object
18 19 20 |
# File 'lib/decidim/api/surveys_type.rb', line 18 def survey(id:) Survey.published.where(component: object).find(id) end |
#surveys ⇒ Object
14 15 16 |
# File 'lib/decidim/api/surveys_type.rb', line 14 def surveys Survey.where(component: object).includes(:component) end |