Skip to content

Commit c05bcf2

Browse files
authored
Merge pull request #725 from fatfreecrm/fix-687-0.16.2
Adust admin controllers (for 0.16.2)
2 parents 4f418cb + eb81d1c commit c05bcf2

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ It does not matter how slowly you go as long as you do not stop.
44
First they ignore you, then they laugh at you, then they fight you,
55
then you win. –- Mahatma Gandhi
66

7+
Mon Jan 22, 2018 (0.16.2)
8+
---------------------------------------------------------------------
9+
Fix #687
10+
711
Sat Jan 6, 2018 (0.16.1)
812
---------------------------------------------------------------------
913
- #653 Fix regression with emails

app/controllers/admin/fields_controller.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
55
#------------------------------------------------------------------------------
66
class Admin::FieldsController < Admin::ApplicationController
7-
before_action "set_current_tab('admin/fields')", only: [:index]
8-
7+
before_action :setup_current_tab, only: [:index]
98
load_resource except: %i[create subform]
109

1110
# GET /fields
@@ -115,4 +114,8 @@ def subform
115114
def field_params
116115
params[:field].permit!
117116
end
117+
118+
def setup_current_tab
119+
set_current_tab('admin/fields')
120+
end
118121
end

app/controllers/admin/plugins_controller.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
55
#------------------------------------------------------------------------------
66
class Admin::PluginsController < Admin::ApplicationController
7-
before_action "set_current_tab('admin/plugins')", only: [:index]
7+
before_action :setup_current_tab, only: [:index]
88

99
# GET /admin/plugins
1010
# GET /admin/plugins.xml
@@ -14,4 +14,10 @@ def index
1414

1515
respond_with(@plugins)
1616
end
17+
18+
protected
19+
20+
def setup_current_tab
21+
set_current_tab('admin/plugins')
22+
end
1723
end

app/controllers/admin/settings_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
55
#------------------------------------------------------------------------------
66
class Admin::SettingsController < Admin::ApplicationController
7-
before_action "set_current_tab('admin/settings')", only: [:index]
7+
before_action :setup_current_tab, only: [:index]
88

99
# GET /admin/settings
1010
# GET /admin/settings.xml
1111
#----------------------------------------------------------------------------
1212
def index
1313
end
14+
15+
def setup_current_tab
16+
set_current_tab('admin/settings')
17+
end
1418
end

app/controllers/admin/tags_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
55
#------------------------------------------------------------------------------
66
class Admin::TagsController < Admin::ApplicationController
7-
before_action "set_current_tab('admin/tags')", only: %i[index show]
7+
before_action :setup_current_tab, only: %i[index show]
88

99
load_resource
1010

@@ -68,4 +68,8 @@ def confirm
6868
def tag_params
6969
params[:tag].permit!
7070
end
71+
72+
def setup_current_tab
73+
set_current_tab('admin/tags')
74+
end
7175
end

lib/fat_free_crm/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module FatFreeCRM
77
module VERSION #:nodoc:
88
MAJOR = 0
99
MINOR = 16
10-
TINY = 1
10+
TINY = 2
1111
PRE = nil
1212

1313
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')

0 commit comments

Comments
 (0)