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(**args) ⇒ Object
19 20 21 |
# File 'lib/decidim/api/debates_type.rb', line 19 def debate(**args) Debate.where(component: object).find_by(id: args[:id]) end |
#debates ⇒ Object
11 12 13 |
# File 'lib/decidim/api/debates_type.rb', line 11 def debates Debate.where(component: object).includes(:component) end |