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