Sha256: 757724af715efeb498189ca23bbf59598687675532c1121c86e86dda9c87f121

Contents?: true

Size: 417 Bytes

Versions: 8

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

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

      def serialize
        {
          question: translated_attribute(resource.question_title),
          response: translated_attribute(resource.title),
          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/sum_of_weights_serializer.rb
decidim-action_delegator-0.7.2 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.7.1 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.7.0 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.6.0 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.5.0 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.4.1 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb
decidim-action_delegator-0.4 app/serializers/decidim/action_delegator/sum_of_weights_serializer.rb