From 4995fa60b93e882572c229ef05c2391862392815 Mon Sep 17 00:00:00 2001 From: Renan Fichberg Date: Mon, 24 Feb 2014 09:37:31 -0300 Subject: [PATCH] Destroy range redircting to expected page properly --- app/views/metric_configurations/_ranges.html.erb | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/app/views/metric_configurations/_ranges.html.erb b/app/views/metric_configurations/_ranges.html.erb index 6870802..497a77c 100644 --- a/app/views/metric_configurations/_ranges.html.erb +++ b/app/views/metric_configurations/_ranges.html.erb @@ -2,4 +2,11 @@ <%= mezuro_range.label %> <%= mezuro_range.beginning %> <%= mezuro_range.end %> + + <% if mezuro_configuration_owner? @metric_configuration.configuration_id %> + <%= link_to 'Destroy Range', mezuro_configuration_metric_configuration_mezuro_range_path(@metric_configuration.configuration_id, + @metric_configuration.id, mezuro_range.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this range?' }, + class: 'btn btn-danger' %> + <% end %> + \ No newline at end of file -- libgit2 0.21.2