notes: redirect /notes/123 to /posts/456#note-123.

This commit is contained in:
evazion
2017-07-03 22:05:53 -05:00
parent df33901938
commit 0bc55bec74

View File

@@ -17,7 +17,9 @@ class NotesController < ApplicationController
def show
@note = Note.find(params[:id])
respond_with(@note)
respond_with(@note) do |format|
format.html { redirect_to(post_path(@note.post, anchor: "note-#{@note.id}")) }
end
end
def create