summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/gs_parameters_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/gs_parameters_controller.rb b/app/controllers/gs_parameters_controller.rb
index 0966132..7ca4e8e 100644
--- a/app/controllers/gs_parameters_controller.rb
+++ b/app/controllers/gs_parameters_controller.rb
@@ -1,4 +1,8 @@
class GsParametersController < ApplicationController
+ load_resource :gs_parameter
+
+ before_filter :spread_breadcrumbs
+
def index
@gs_parameters_unordered = GsParameter.scoped
@gs_parameters = GsParameter.order([:section, :name])
@@ -30,4 +34,11 @@ class GsParametersController < ApplicationController
def gs_parameter_params
params.require(:gs_parameter).permit(:value, :class_type, :description)
end
+
+ def spread_breadcrumbs
+ add_breadcrumb t("gs_parameters.index.page_title"), gs_parameters_path
+ if @gs_parameter && !@gs_parameter.new_record?
+ add_breadcrumb @gs_parameter, gs_parameter_path(@gs_parameter)
+ end
+ end
end