Skip to content

Commit

Permalink
Merge pull request #469 from slovensko-digital/GO-44/inform_users_abo…
Browse files Browse the repository at this point in the history
…ut_save_changes

GO-44 Add flash info message about saving message draft changes
  • Loading branch information
luciajanikova authored Sep 9, 2024
2 parents a8aef92 + ef4991d commit af704a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/message_drafts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def update
authorize @message

@message.update_content(message_draft_params)

flash[:notice] = 'Zmeny boli uložené'
end

def destroy
Expand Down
3 changes: 3 additions & 0 deletions app/views/message_drafts/update.turbo_stream.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<%= turbo_stream.update "modal" do %>
<%= render Common::FlashComponent.new %>
<% end %>

0 comments on commit af704a7

Please sign in to comment.