ref: master
plugins/container_block/controllers/container_block_plugin_controller.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
module ContainerBlockPluginController def saveWidths container = boxes_holder.blocks.find(params[:id]) pairs = params[:widths].split('|') settings = container.children_settings pairs.each do |pair| id, width = pair.split(',') settings[id.to_i] = {:width => width.to_i} end container.children_settings = settings container.save! render :text => _('Block successfully saved.') end end |