Skip to content

Commit

Permalink
Restore create.js.erb
Browse files Browse the repository at this point in the history
  • Loading branch information
jvendetti committed Nov 8, 2024
1 parent 7bca691 commit 244a222
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/change_requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def create
@issue = IssueCreatorService.call(params)
flash.now.notice = helpers.change_request_success_message if @issue['id'].present?

respond_to :turbo_stream
# TODO: remove format.js from this block, and the create.js.erb file after the create_synonym and
# remove_synonym actions are converted from Rails UJS to Turbo Streams.
respond_to do |format|
format.js
format.turbo_stream
end
end

private
Expand Down
2 changes: 2 additions & 0 deletions app/views/change_requests/create.js.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
document.getElementById('change-request-notice').innerHTML = '<%= j render partial: "notice" %>'
document.getElementById('addProposalFormDiv').innerHTML = '';

0 comments on commit 244a222

Please sign in to comment.