Sha256: 2382f91d25192b0deef9d0296d430d1ca5b5ea2f1cfc179b281125869dc9ef38

Contents?: true

Size: 627 Bytes

Versions: 1

Compression:

Stored size: 627 Bytes

Contents

module Ecoportal
  module API
    class V2
      class Pages
        class PageStage < V2::Page
          passthrough :mould_counter, :archive
          passthrough :task_priority, :state, :status
          passthrough :votes_enabled, :upvotes, :downvotes

          embeds_many :permits, klass: "Ecoportal::API::V2::Page::Permit"
          passarray   :force_errors, :subtags, order_matters: false

          # `id` of the stage we got the data of.
          def current_stage_id
            doc.dig("active_stage", "id") || doc["current_stage_id"]
          end

        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecoportal-api-v2-0.8.11 lib/ecoportal/api/v2/pages/page_stage.rb