From ae057666bf9894660ce1cb480595f2686f1d9ae5 Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Fri, 20 Jan 2017 13:00:19 -0200 Subject: EE backport for new application settings service --- app/services/application_settings/base_service.rb | 7 +++++++ app/services/application_settings/update_service.rb | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 app/services/application_settings/base_service.rb create mode 100644 app/services/application_settings/update_service.rb (limited to 'app/services/application_settings') diff --git a/app/services/application_settings/base_service.rb b/app/services/application_settings/base_service.rb new file mode 100644 index 00000000000..2bcc7d7c08b --- /dev/null +++ b/app/services/application_settings/base_service.rb @@ -0,0 +1,7 @@ +module ApplicationSettings + class BaseService < ::BaseService + def initialize(application_setting, user, params = {}) + @application_setting, @current_user, @params = application_setting, user, params.dup + end + end +end diff --git a/app/services/application_settings/update_service.rb b/app/services/application_settings/update_service.rb new file mode 100644 index 00000000000..61589a07250 --- /dev/null +++ b/app/services/application_settings/update_service.rb @@ -0,0 +1,7 @@ +module ApplicationSettings + class UpdateService < ApplicationSettings::BaseService + def execute + @application_setting.update(@params) + end + end +end -- cgit v1.2.3