Sha256: 19c143326426401496b20c196ced8c8b71f6bd929c3669d76c905b8acb42002b

Contents?: true

Size: 745 Bytes

Versions: 11

Compression:

Stored size: 745 Bytes

Contents

module Plugins
  module PluginClass
    class AdminController < CamaleonCms::Apps::PluginsAdminController
      include Plugins::PluginClass::MainHelper
      def index; end

      # show settings form
      def settings; end

      # save values from settings form
      def save_settings
        @plugin.set_options(params[:options]) if params[:options].present? # save option values
        @plugin.set_metas(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
      # add custom methods below ....
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
camaleon_cms-2.9.0 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.8.3 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.8.2 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.8.1 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.8.0 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.5 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.4 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.3 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.2 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.1 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb
camaleon_cms-2.7.0 lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb