Class: Alchemy::PageSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/alchemy/page_serializer.rb

Instance Method Summary collapse

Instance Method Details

#elementsObject



20
21
22
23
24
25
26
# File 'app/serializers/alchemy/page_serializer.rb', line 20

def elements
  if object.has_cells?
    object.elements.not_in_cell.published
  else
    object.elements.published
  end
end