Module: SystemSettings
- Included in:
- Config
- Defined in:
- lib/user/config/system_settings.rb
Instance Method Summary collapse
-
#clear_settings_cache ⇒ Object
Clear tag.
-
#create_setting(data) ⇒ Object
Create setting.
-
#get_settings ⇒ Object
Get settings.
-
#get_settings_by_keys(options) ⇒ Object
System Settings.
Instance Method Details
permalink #clear_settings_cache ⇒ Object
Clear tag.
Clear a tag info.
Parameters
- tag
-
(Integer) – Tag id.
Example
@data = @cxf_user.clear_tag(1)
51 52 53 |
# File 'lib/user/config/system_settings.rb', line 51 def clear_settings_cache @client.raw('post', "/config/system-settings/clear-cache") end |
permalink #create_setting(data) ⇒ Object
Create setting.
Create a setting title with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
title: 'new_settings'
}
@data = @cxf_user.create_setting(data)
39 40 41 |
# File 'lib/user/config/system_settings.rb', line 39 def create_setting(data) @client.raw('post', '/config/system-settings', nil, data_transform(data)) end |
permalink #get_settings ⇒ Object
Get settings.
Get a collection of settings.
Example
@data = @cxf_user.get_settings
24 25 26 |
# File 'lib/user/config/system_settings.rb', line 24 def get_settings @client.raw('get', '/config/system-settings') end |
permalink #get_settings_by_keys(options) ⇒ Object
System Settings
Get settings by keys.
Get a collection of settings using keys.
Example
= {
setting_keys: 'email_transport_provider,email_template_provider,email_template_default_from_address'
}
@data = @cxf_user.get_settings_by_keys()
15 16 17 |
# File 'lib/user/config/system_settings.rb', line 15 def get_settings_by_keys() @client.raw('get', '/config/system-settings/by-keys', ) end |