Class: AdminSetting
- Inherits:
-
RailsSettings::Base
- Object
- RailsSettings::Base
- AdminSetting
- Defined in:
- app/models/admin_setting.rb
Overview
Read rails-settings-cached about how to use this class for internal team, we can update the value of each field from localhost:3000/admin/settings for production environment, this page is protected. since there are many functionality are depending on this class, please be careful when updating the value
Constant Summary collapse
- OMISE_PROVIDER =
Payment provider constants
'omise'- GB_PRIMEPAY_PROVIDER =
'gb_primepay'- SUPPORTED_CURRENCIES =
Exchange Rate Buffers (in percentage) Exchange Rate Buffers - Supported currencies
%w[thb aud cny eur gbp hkd jpy usd sgd myr rub krw idr vnd].freeze
Class Method Summary collapse
- .hotline_channel ⇒ Object
- .hotline_for_no_ack ⇒ Object
- .jaguar_host ⇒ Object
- .support_phones ⇒ Object
- .with_lang(prefix, language = MyLocaleManager.default_locale) ⇒ Object
Class Method Details
.hotline_channel ⇒ Object
277 278 279 |
# File 'app/models/admin_setting.rb', line 277 def hotline_channel channel_hotline end |
.hotline_for_no_ack ⇒ Object
273 274 275 |
# File 'app/models/admin_setting.rb', line 273 def hotline_for_no_ack reservation_no_ack_hotline end |
.jaguar_host ⇒ Object
290 291 292 293 |
# File 'app/models/admin_setting.rb', line 290 def self.jaguar_host host = super host.is_a?(String) ? host.strip.sub(%r{/\z}, '') : host end |
.support_phones ⇒ Object
281 282 283 |
# File 'app/models/admin_setting.rb', line 281 def support_phones support_phone.to_s.split(',') end |
.with_lang(prefix, language = MyLocaleManager.default_locale) ⇒ Object
285 286 287 288 |
# File 'app/models/admin_setting.rb', line 285 def with_lang(prefix, language = MyLocaleManager.default_locale) setting = send("#{prefix}_#{language}") setting.presence || send("#{prefix}_#{MyLocaleManager.default_locale}") end |