Skip to content

Commit

Permalink
Update task view
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsmith committed Oct 8, 2017
1 parent 199d2b5 commit 76c7ad2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/code_corps/model/task.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ defmodule CodeCorps.Task do
field :closed_at, :utc_datetime
field :created_at, :utc_datetime
field :created_from, :string, default: "code_corps"
field :github_issue_number, :integer
field :markdown, :string
field :modified_at, :utc_datetime
field :modified_from, :string, default: "code_corps"
field :number, :integer, read_after_writes: true
field :order, :integer
field :status, :string, default: "open"
field :title, :string
field :github_issue_number, :integer

field :position, :integer, virtual: true

Expand Down
5 changes: 3 additions & 2 deletions lib/code_corps_web/views/task_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ defmodule CodeCorpsWeb.TaskView do
use JaSerializer.PhoenixView

attributes [
:archived, :body, :created_at, :created_from, :inserted_at, :markdown,
:modified_at, :modified_from, :number, :order, :status, :title, :updated_at
:archived, :body, :created_at, :created_from, :github_issue_number,
:inserted_at, :markdown, :modified_at, :modified_from, :number, :order,
:status, :title, :updated_at
]

has_one :github_repo, serializer: CodeCorpsWeb.GithubRepoView
Expand Down
1 change: 1 addition & 0 deletions test/lib/code_corps_web/views/task_view_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ defmodule CodeCorpsWeb.TaskViewTest do
"body" => task.body,
"created-at" => task.created_at,
"created-from" => task.created_from,
"github-issue-number" => task.github_issue_number,
"inserted-at" => task.inserted_at,
"markdown" => task.markdown,
"modified-at" => task.modified_at,
Expand Down

0 comments on commit 76c7ad2

Please sign in to comment.