Sha256: 42cc9e7e4e24f1bc57a02bbd26b0ddf9ffb54f814cd80442520761c13c1b880e
Contents?: true
Size: 642 Bytes
Versions: 14
Compression:
Stored size: 642 Bytes
Contents
class TestingNotePresenter include AvatarHelper def initialize(testing_notes) @testing_notes = testing_notes end def as_json(*args) if @testing_notes.is_a?(TestingNote) to_hash @testing_notes else @testing_notes.map(&method(:to_hash)) end end def to_hash(testing_note) { id: testing_note.id, createdAt: testing_note.created_at, avatarImage: avatar_for(testing_note.user), userId: testing_note.user_id, byTester: testing_note.user.try(:tester?), ticketId: testing_note.ticket_id, verdict: testing_note.verdict, comment: testing_note.comment } end end
Version data entries
14 entries across 14 versions & 1 rubygems