1
0

Added separate destroy view

This commit is contained in:
cryptogopher 2019-12-06 23:12:39 +01:00
parent 32ad182870
commit df5fb71e10
2 changed files with 5 additions and 2 deletions

View File

@ -42,8 +42,6 @@ class MeasurementsController < ApplicationController
if @measurement.destroy
flash[:notice] = 'Deleted measurement'
end
prepare_measurements
render :index
end
def retake

View File

@ -0,0 +1,5 @@
$('div[id^=flash_]').remove();
$('#content').prepend('<%= j render_flash_messages %>');
<% if @measurement.destroyed? %>
$('tr[id=measurement-<%= @measurement.id %>]').remove();
<% end %>