Class: Decidim::Pages::PagesType

Inherits:
Core::ComponentType
  • Object
show all
Defined in:
lib/decidim/api/pages_type.rb

Instance Method Summary collapse

Instance Method Details

#page(**args) ⇒ Object



18
19
20
# File 'lib/decidim/api/pages_type.rb', line 18

def page(**args)
  Page.where(component: object).find_by(id: args[:id])
end

#pagesObject



14
15
16
# File 'lib/decidim/api/pages_type.rb', line 14

def pages
  Page.where(component: object).includes(:component)
end