Sha256: d8ae4f97118a92218dc6af2c4506da90dcb2ffd012b5a1a06036e3cdd73419c2

Contents?: true

Size: 614 Bytes

Versions: 28

Compression:

Stored size: 614 Bytes

Contents

module Caboose
  class PageBlockFieldValuesController < ApplicationController
    
    # PUT /admin/page-block-field-values/:id
    def admin_update
      return unless user_is_allowed('pages', 'edit')
      
      resp = StdClass.new({'attributes' => {}})
      fv = PageBlockFieldValue.find(params[:id])
                  
      save = true
      user = logged_in_user      
      
      params.each do |k,v|
        case k
          when 'value'
            fv.value = v        
        end
      end      
               
      resp.success = save && fv.save
      render :json => resp
    end
		
  end  
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
caboose-cms-0.3.22 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.20 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.19 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.17 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.16 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.15 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.14 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.13 app/controllers/caboose/page_block_field_values_controller.rb