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
18 19 20 |
# File 'lib/decidim/api/surveys_type.rb', line 18 def survey(**args) Survey.where(component: object).find_by(id: args[: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 |