Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ae057666
Commit
ae057666
authored
Jan 20, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE backport for new application settings service
parent
3a54128d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+5
-1
app/services/application_settings/base_service.rb
app/services/application_settings/base_service.rb
+7
-0
app/services/application_settings/update_service.rb
app/services/application_settings/update_service.rb
+7
-0
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
ae057666
...
...
@@ -5,7 +5,11 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end
def
update
if
@application_setting
.
update_attributes
(
application_setting_params
)
successful
=
ApplicationSettings
::
UpdateService
.
new
(
@application_setting
,
current_user
,
application_setting_params
)
.
execute
if
successful
redirect_to
admin_application_settings_path
,
notice:
'Application settings saved successfully'
else
...
...
app/services/application_settings/base_service.rb
0 → 100644
View file @
ae057666
module
ApplicationSettings
class
BaseService
<
::
BaseService
def
initialize
(
application_setting
,
user
,
params
=
{})
@application_setting
,
@current_user
,
@params
=
application_setting
,
user
,
params
.
dup
end
end
end
app/services/application_settings/update_service.rb
0 → 100644
View file @
ae057666
module
ApplicationSettings
class
UpdateService
<
ApplicationSettings
::
BaseService
def
execute
@application_setting
.
update
(
@params
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment