Sha256: e09c4e22954a3b602cc9e783d845daf980c90f46bd37f0f17290c327ff1e047e

Contents?: true

Size: 803 Bytes

Versions: 14

Compression:

Stored size: 803 Bytes

Contents

module Qbrick
  module Cms
    class SettingsCollectionsController < BackendController
      def index
        @settings_collections = [
          Qbrick::SettingsCollection.find_by(collection_type: 'site'),
          Qbrick::SettingsCollection.find_by(collection_type: 'page'),
          Qbrick::SettingsCollection.find_by(collection_type: 'global')
        ]
      end

      def update
        @settings_collection = Qbrick::SettingsCollection.find(params[:id])
        @settings_collection.update_attributes(settings_collection_params)

        respond_with @settings_collection, location: cms_settings_collections_path
      end

      private

      def settings_collection_params
        params.require(:settings_collection).permit(settings_attributes: [:value, :id])
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
qbrick-2.6.10 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.9 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.8 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.7 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.6 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.5 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.4 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.3 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.2 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.1 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.6.0 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.5.2 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.5.1 app/controllers/qbrick/cms/settings_collections_controller.rb
qbrick-2.5.0 app/controllers/qbrick/cms/settings_collections_controller.rb