Sha256: ec3ed75fc1c615873235bda4a90cc2335e84ad520ea6d0e9afda6f9b867808af

Contents?: true

Size: 573 Bytes

Versions: 51

Compression:

Stored size: 573 Bytes

Contents

module Para
  module Admin
    class SettingsComponentController < Para::Admin::ComponentController
      def show
        @settings = SettingsRails::Form.new
      end

      def update
        form = SettingsRails::Form.new
        form.settings_attributes = settings_params[:settings_attributes]
        form.save
        flash_message(:success, form)
        redirect_to admin_settings_path(@component)
      end

      private

      def settings_params
        params.require(:resource).permit(settings_attributes: [:key, :_type, :value])
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
para-0.11.4 app/controllers/para/admin/settings_component_controller.rb
para-0.11.3 app/controllers/para/admin/settings_component_controller.rb
para-0.11.2 app/controllers/para/admin/settings_component_controller.rb
para-0.11.1 app/controllers/para/admin/settings_component_controller.rb
para-0.11.0 app/controllers/para/admin/settings_component_controller.rb
para-0.10.0 app/controllers/para/admin/settings_component_controller.rb
para-0.9.4 app/controllers/para/admin/settings_component_controller.rb
para-0.9.3.3 app/controllers/para/admin/settings_component_controller.rb
para-0.9.3.2 app/controllers/para/admin/settings_component_controller.rb
para-0.9.3.1 app/controllers/para/admin/settings_component_controller.rb
para-0.9.2 app/controllers/para/admin/settings_component_controller.rb
para-0.9.0 app/controllers/para/admin/settings_component_controller.rb
para-0.8.15 app/controllers/para/admin/settings_component_controller.rb
para-0.8.14 app/controllers/para/admin/settings_component_controller.rb
para-0.8.13 app/controllers/para/admin/settings_component_controller.rb
para-0.8.12 app/controllers/para/admin/settings_component_controller.rb
para-0.8.11 app/controllers/para/admin/settings_component_controller.rb
para-0.8.10 app/controllers/para/admin/settings_component_controller.rb
para-0.8.9 app/controllers/para/admin/settings_component_controller.rb
para-0.8.8 app/controllers/para/admin/settings_component_controller.rb