Skip to content

Commit

Permalink
Links to conversation view from reply notification emails
Browse files Browse the repository at this point in the history
  • Loading branch information
cbothner committed Dec 12, 2017
1 parent 0f7eb58 commit 452be0e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/controllers/comment_threads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create
def show
current_reader.update active_community_id: @comment_thread.forum
.community.id
redirect_to inline_comment_thread_url @comment_thread
redirect_to conversation_comment_thread_url @comment_thread
end

def destroy
Expand Down Expand Up @@ -64,9 +64,8 @@ def comment_thread_params
params.require(:comment_thread).permit(:start, :length, :block_index, :original_highlight_text)
end

def inline_comment_thread_url(comment_thread)
def conversation_comment_thread_url(comment_thread)
"#{case_url(I18n.locale, comment_thread.card.case.slug)}" \
"/#{comment_thread.card.element.case_element.position}" \
"/cards/#{comment_thread.card_id}/comments/#{comment_thread.id}"
"/conversation/#{comment_thread.id}"
end
end

0 comments on commit 452be0e

Please sign in to comment.