this code generated by scaffold ends up printing the same message twice and i can't get it to stop.
def update
respond_to do |format|
if @indi.update(indi_params)
puts("message about to be shown to us by the system")
format.html { redirect_to @indi, notice: 'Indi was successfully updated.' }
format.json { render :show, status: :ok, location: @indi }
else
format.html { render :edit }
format.json { render json: @indi.errors, status: :unprocessable_entity }
end
end
end
it prints the success message twice in the web page.
<%= alert %>
<% end %> <%= yield %> – user1747236 Jun 21 '18 at 19:05<%= notice %>
– user1747236 Jun 21 '18 at 19:07