From df232c272b671d52724e6b7eaf0189e73f049839 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto <brodock@gmail.com> Date: Sat, 12 Mar 2016 18:42:00 -0300 Subject: [PATCH] =?UTF-8?q?Small=20improvements=20and=20=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin/geo_nodes_controller.rb | 8 +++++--- app/views/admin/geo_nodes/index.html.haml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/geo_nodes_controller.rb b/app/controllers/admin/geo_nodes_controller.rb index dda912e9dfe..620389dd9ca 100644 --- a/app/controllers/admin/geo_nodes_controller.rb +++ b/app/controllers/admin/geo_nodes_controller.rb @@ -26,12 +26,14 @@ class Admin::GeoNodesController < Admin::ApplicationController @node = GeoNode.find(params[:id]) if @node.primary? || !@node.missing_oauth_application? - redirect_to admin_geo_nodes_path, notice: "This node doesn't need to be repaired." + flash[:notice] = "This node doesn't need to be repaired." elsif @node.save - redirect_to admin_geo_nodes_path, notice: 'Node Authentication was successfully repaired.' + flash[:notice] = 'Node Authentication was successfully repaired.' else - redirect_to admin_geo_nodes_path, alert: 'There was a problem repairing Node Authentication.' + flash[:alert] = 'There was a problem repairing Node Authentication.' end + + redirect_to admin_geo_nodes_path end private diff --git a/app/views/admin/geo_nodes/index.html.haml b/app/views/admin/geo_nodes/index.html.haml index fa24e0d10f6..73931ae41f7 100644 --- a/app/views/admin/geo_nodes/index.html.haml +++ b/app/views/admin/geo_nodes/index.html.haml @@ -53,7 +53,7 @@ .pull-right - if node.missing_oauth_application? - = link_to repair_admin_geo_node_path(node), method: :post, class: 'btn btn-default, btn-sm' do + = link_to repair_admin_geo_node_path(node), method: :post, title: 'OAuth application is missing', class: 'btn btn-default, btn-sm' do = icon('exclamation-triangle fw') Repair authentication = link_to 'Remove', admin_geo_node_path(node), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm' -- 2.30.9