Sha256: f71d0b9500969f610d3310e894a5c24ad40c204fcee5261f195f3ac85d89a8d1

Contents?: true

Size: 290 Bytes

Versions: 6

Compression:

Stored size: 290 Bytes

Contents

module Rapidfire
  class QuestionResultSerializer < ActiveModel::Serializer
    self.root = false

    attributes :question_type, :question_text, :results

    def question_type
      object.question.type
    end

    def question_text
      object.question.question_text
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
rapidfire-3.1.0 app/serializers/rapidfire/question_result_serializer.rb
rapidfire-3.0.0 app/serializers/rapidfire/question_result_serializer.rb
rapidfire-2.1.0 app/serializers/rapidfire/question_result_serializer.rb
rapidfire-2.0.0 app/serializers/rapidfire/question_result_serializer.rb
unique_rapidfire-1.0.0 app/serializers/rapidfire/question_result_serializer.rb
rapidfire-1.2.0 app/serializers/rapidfire/question_result_serializer.rb