Class: Decidim::Pages::PagesType
- Inherits:
-
Api::Types::BaseObject
- Object
- Api::Types::BaseObject
- Decidim::Pages::PagesType
- Defined in:
- lib/decidim/api/pages_type.rb
Instance Method Summary collapse
Instance Method Details
#page(**args) ⇒ Object
21 22 23 |
# File 'lib/decidim/api/pages_type.rb', line 21 def page(**args) Page.where(component: object).find_by(id: args[:id]) end |
#pages ⇒ Object
13 14 15 |
# File 'lib/decidim/api/pages_type.rb', line 13 def pages Page.where(component: object).includes(:component) end |