summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/gateway_parameters_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/gateway_parameters_controller.rb b/app/controllers/gateway_parameters_controller.rb
index d5ade9e..693a484 100644
--- a/app/controllers/gateway_parameters_controller.rb
+++ b/app/controllers/gateway_parameters_controller.rb
@@ -2,6 +2,8 @@ class GatewayParametersController < ApplicationController
load_and_authorize_resource :gateway
load_and_authorize_resource :gateway_parameter, :through => [:gateway]
+ before_filter :spread_breadcrumbs
+
def index
@gateway_parameters = @gateway.gateway_parameters
end
@@ -41,4 +43,15 @@ class GatewayParametersController < ApplicationController
@gateway_parameter.destroy
redirect_to gateway_path(@gateway), :notice => t('gateway_parameters.controller.successfuly_destroyed')
end
+
+ private
+ def spread_breadcrumbs
+ add_breadcrumb t("gateways.index.page_title"), gateways_path
+ add_breadcrumb @gateway, @gateway
+ add_breadcrumb t("gateway_parameters.index.page_title"), gateway_gateway_parameters_url(@gateway)
+
+ if @gateway_parameter && !@gateway_parameter.new_record?
+ add_breadcrumb @gateway_parameter
+ end
+ end
end