From 198883be1790c28394f700b0393a6e00323c5f14 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 22 Jan 2018 10:22:01 +1030 Subject: [PATCH 1/4] Fix #687 --- app/controllers/admin/fields_controller.rb | 7 +++++-- app/controllers/admin/plugins_controller.rb | 7 ++++++- app/controllers/admin/settings_controller.rb | 6 +++++- app/controllers/admin/tags_controller.rb | 6 +++++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/fields_controller.rb b/app/controllers/admin/fields_controller.rb index 029d93b9e0..0524ecb316 100644 --- a/app/controllers/admin/fields_controller.rb +++ b/app/controllers/admin/fields_controller.rb @@ -4,8 +4,7 @@ # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ class Admin::FieldsController < Admin::ApplicationController - before_action "set_current_tab('admin/fields')", only: [:index] - + before_action :setup_current_tab, only: [:index] load_resource except: %i[create subform] # GET /fields @@ -115,4 +114,8 @@ def subform def field_params params[:field].permit! end + + def setup_current_tab + set_current_tab('admin/fields') + end end diff --git a/app/controllers/admin/plugins_controller.rb b/app/controllers/admin/plugins_controller.rb index 5c01068f72..c9cb535d84 100644 --- a/app/controllers/admin/plugins_controller.rb +++ b/app/controllers/admin/plugins_controller.rb @@ -4,7 +4,7 @@ # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ class Admin::PluginsController < Admin::ApplicationController - before_action "set_current_tab('admin/plugins')", only: [:index] + before_action :setup_current_tab, only: [:index] # GET /admin/plugins # GET /admin/plugins.xml @@ -14,4 +14,9 @@ def index respond_with(@plugins) end + + protected + def setup_current_tab + set_current_tab('admin/plugins') + end end diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index bfcdc0b7cf..13b135ed54 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -4,11 +4,15 @@ # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ class Admin::SettingsController < Admin::ApplicationController - before_action "set_current_tab('admin/settings')", only: [:index] + before_action :setup_current_tab, only: [:index] # GET /admin/settings # GET /admin/settings.xml #---------------------------------------------------------------------------- def index end + + def setup_current_tab + set_current_tab('admin/settings') + end end diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb index cc328ee2aa..300f756a07 100644 --- a/app/controllers/admin/tags_controller.rb +++ b/app/controllers/admin/tags_controller.rb @@ -4,7 +4,7 @@ # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ class Admin::TagsController < Admin::ApplicationController - before_action "set_current_tab('admin/tags')", only: %i[index show] + before_action :setup_current_tab, only: %i[index show] load_resource @@ -68,4 +68,8 @@ def confirm def tag_params params[:tag].permit! end + + def setup_current_tab + set_current_tab('admin/tags') + end end From 6eaeff9e10f21929a240f1ec938563eb4d5daced Mon Sep 17 00:00:00 2001 From: Johnny Shields Date: Mon, 22 Jan 2018 19:16:47 +0900 Subject: [PATCH 2/4] Update plugins_controller.rb --- app/controllers/admin/plugins_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/admin/plugins_controller.rb b/app/controllers/admin/plugins_controller.rb index c9cb535d84..1e91530bcf 100644 --- a/app/controllers/admin/plugins_controller.rb +++ b/app/controllers/admin/plugins_controller.rb @@ -16,6 +16,7 @@ def index end protected + def setup_current_tab set_current_tab('admin/plugins') end From 1d1d2347551aa6d38b7c100f1ca481a0e6e27d77 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 22 Jan 2018 22:59:28 +1030 Subject: [PATCH 3/4] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ccabdffa4..e59fa61165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ It does not matter how slowly you go as long as you do not stop. First they ignore you, then they laugh at you, then they fight you, then you win. –- Mahatma Gandhi +Mon Jan 22, 2018 (0.16.2) +--------------------------------------------------------------------- +Fix #687 + Sat Jan 6, 2018 (0.16.1) --------------------------------------------------------------------- - #653 Fix regression with emails From eb81d1c8cf6fd511397e3bef1a77c95c39051dec Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Mon, 22 Jan 2018 22:59:44 +1030 Subject: [PATCH 4/4] Bump version --- lib/fat_free_crm/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fat_free_crm/version.rb b/lib/fat_free_crm/version.rb index 0b9849cf9a..2dfaa044ee 100644 --- a/lib/fat_free_crm/version.rb +++ b/lib/fat_free_crm/version.rb @@ -7,7 +7,7 @@ module FatFreeCRM module VERSION #:nodoc: MAJOR = 0 MINOR = 16 - TINY = 1 + TINY = 2 PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')