Class: Plugins::CamaleonSitemapCustomizer::AdminController
- Inherits:
-
CamaleonCms::Apps::PluginsAdminController
- Object
- CamaleonCms::Apps::PluginsAdminController
- Plugins::CamaleonSitemapCustomizer::AdminController
- Includes:
- MainHelper
- Defined in:
- app/controllers/plugins/camaleon_sitemap_customizer/admin_controller.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ "skip_post_types" => [], "skip_post_list_types" => [], "skip_category_list_types" => [], "skip_all_categories" => false, "skip_tags" => false, "skip_home" => false, "cache" => Rails.env.test?, "submit_changes_to_google" => false }.freeze
Instance Method Summary collapse
- #index ⇒ Object
-
#save_settings ⇒ Object
save values from settings form.
-
#settings ⇒ Object
show settings form.
Instance Method Details
#index ⇒ Object
16 17 |
# File 'app/controllers/plugins/camaleon_sitemap_customizer/admin_controller.rb', line 16 def index end |
#save_settings ⇒ Object
save values from settings form
24 25 26 27 28 29 30 |
# File 'app/controllers/plugins/camaleon_sitemap_customizer/admin_controller.rb', line 24 def save_settings = DEFAULT_OPTIONS.merge(params[:options]&.to_unsafe_h.presence || {}) @plugin.() # save option values @plugin.(params[:metas]) if params[:metas].present? # save meta values @plugin.set_field_values(params[:field_options]) if params[:field_options].present? # save custom field values redirect_to url_for(action: :settings), notice: "Settings Saved Successfully" end |
#settings ⇒ Object
show settings form
20 21 |
# File 'app/controllers/plugins/camaleon_sitemap_customizer/admin_controller.rb', line 20 def settings end |