Class: Decidim::Pages::PagesType

Inherits:
Api::Types::BaseObject
  • Object
show all
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

#pagesObject



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

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