diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-15 20:44:19 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-15 20:44:19 +0100 |
commit | 907d081bf1b45e876f9d5833bfe1f4d6319aeb81 (patch) | |
tree | 7b24d6792d946d8327570a9212a0f7c121192fed /app/controllers | |
parent | ca77ad70f4c2df28f6460e0160f23d115174440d (diff) |
Added breadcrumbs for GsParameter.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/gs_parameters_controller.rb | 11 |
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 |