Sha256: 75de1c790ae9df5868981f1b87608f012cca8d61909633dafbad2c5d1cd7e39a
Contents?: true
Size: 449 Bytes
Versions: 6
Compression:
Stored size: 449 Bytes
Contents
module ActiveRecordSurveyApi class AnswerSerializer < BaseSerializer attribute :text #attribute :next_question_id do # i = object.next_question # ((i)? i.id.to_s : nil) #end has_one :question has_one :next_question attributes :sibling_index do object.sibling_index end def type "#{object.class.name.demodulize.tableize.singularize.dasherize}_answers" end def self_link url_helpers.answer_path(id) end end end
Version data entries
6 entries across 6 versions & 1 rubygems