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



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

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

#pagesObject



11
12
13
# File 'lib/decidim/api/pages_type.rb', line 11

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