Sha256: 86d84988649bb6a7f321177c5e442b0389da72100adf34cf5f97c1afce463e58

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ActionDelegator
    class ConsultationResultsSerializer < Decidim::Exporters::Serializer
      include Decidim::TranslationsHelper

      def serialize
        {
          question: translated_attribute(resource.question.title),
          response: translated_attribute(resource.title),
          membership_type: resource.membership_type,
          membership_weight: resource.membership_weight,
          votes_count: resource.votes_count
        }
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-action_delegator-0.8.1 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.7.2 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.7.1 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.7.0 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.6.0 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.5.0 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.4.1 app/serializers/decidim/action_delegator/consultation_results_serializer.rb
decidim-action_delegator-0.4 app/serializers/decidim/action_delegator/consultation_results_serializer.rb