Class: Houston::Roadmaps::TicketPresenter

Inherits:
TicketPresenter
  • Object
show all
Includes:
MarkdownHelper
Defined in:
app/presenters/houston/roadmaps/ticket_presenter.rb

Instance Method Summary collapse

Instance Method Details

#ticket_to_json(ticket) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/presenters/houston/roadmaps/ticket_presenter.rb', line 4

def ticket_to_json(ticket)
  reporter = ticket.reporter
  super.merge(
    tasks: ticket.tasks.map { |task| task.ticket = ticket; {
      id: task.id,
      description: task.description,
      completedAt: task.completed_at,
      number: task.number,
      letter: task.letter,
      effort: task.effort } },
    reporter: reporter && {
      email: reporter.email,
      name: reporter.name },
    firstReleaseAt: ticket.first_release_at)
end