Platform Settings
Overviewâ
We can add platform settings with key-value management.
Installationâ
rails g cm_admin:add_cm_platform_setting
Usageâ
- Add or create a new constant type for platform settings category.
- Add a helper method for platform settings category constant with name
select_options_for_setting_category. NOTE: Adding this helper method is mandatory, otherwise platform settings page will fail.
def select_options_for_setting_category(_ = nil, _ = nil)
# add the constant type for platform settings category according to your application.
::Constant.setting_category.map { |category| [category.name, category.id] }
end
- We can create a translation by going to
/cm_admin/platform_settings.
- setting - The name of the setting. Eg: Project Name
- description - The description of the setting. Eg: The title used to identify your project across the system.
- value - The value of the setting. Eg: Commutatus
- category - The category of the setting. Eg: Emails