Skip to content

Commit

Permalink
Notes and state properly rerender on front and and persist on back end
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewasmit committed Feb 19, 2023
1 parent 244db6e commit 8039a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ class ApplicationController < Sinatra::Base
end

post "/library/:id" do
# binding.pry
updated_piece = Piece.find(params[:id])
note = Note.create(
note: params[:note],
piece_id: params[:id]
)
note.to_json
updated_piece.to_json(include: :notes)
end


Expand Down

0 comments on commit 8039a6a

Please sign in to comment.