platehub/plate_api

View on GitHub
lib/plate_api/plate_object/section.rb

Summary

Maintainability
A
0 mins
Test Coverage
module PlateApi::PlateObject
  class Section < Base

    has_one :post, "PlateApi::PlateObject::Post"
    has_one :site_translation, "PlateApi::PlateObject::SiteTranslation"
    has_many :rows, :row, "PlateApi::PlateObject::Row", true
    has_many :columns, :column, "PlateApi::PlateObject::Column"
    has_many :elements, :element, "PlateApi::PlateObject::Element"

    def self.api_name
      "sections"
    end

    def self.parent_class
      Post
    end
  end
end