Skip to content

宿題記法に紐づいたタスクが削除されると,宿題記法のリンクが正常に動作しない #44

Description

@mukohara

概要

PR #36 によるバグ

詳細

  • 宿題記法から作成したタスクを削除すると,その記法に対応する ActionItem の task_url が無効なリンクを持つ.
  • 上記により,タスク削除後に対応する宿題記法のリンク先に遷移すると ActiveRecord エラーが起こる.

原因

リンクを埋め込む際,リンクに対応するタスクの存在を確認していない.

<% if task_url != nil %>
<%= link_to matched[0], task_url.to_s %>
<% else %>
<% message = "Created from [AI#{matched[1]}](#{request.url})" %>
<%= link_to matched[0], new_task_path(desc_header: message) %>
<% end %>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions