Class: Decidim::Debates::DebatesType
- Inherits:
-
Core::ComponentType
- Object
- Core::ComponentType
- Decidim::Debates::DebatesType
- Defined in:
- lib/decidim/api/debates_type.rb
Instance Method Summary collapse
Instance Method Details
#debate(id:) ⇒ Object
18 19 20 |
# File 'lib/decidim/api/debates_type.rb', line 18 def debate(id:) Decidim::Core::ComponentFinderBase.new(model_class: Debate).call(object, { id: }, context) end |
#debates ⇒ Object
14 15 16 |
# File 'lib/decidim/api/debates_type.rb', line 14 def debates Debate.where(component: object).includes(:component) end |