Avoid full page reloads on report#show
This commit is contained in:
parent
916b370905
commit
c44c9ccaba
7 changed files with 19 additions and 8 deletions
|
|
@ -31,7 +31,10 @@ class ElementsController < ApplicationController
|
|||
@element.success_criteria.create!(title: check.name, description_html: check.success_criterion_html,
|
||||
level: check.level)
|
||||
end
|
||||
redirect_to @element.report, notice: 'Element was successfully created.'
|
||||
respond_to do |format|
|
||||
format.html { redirect_to @element.report, notice: 'Element was successfully created.' }
|
||||
format.turbo_stream
|
||||
end
|
||||
else
|
||||
render :new, status: :unprocessable_entity
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue