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.42 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.41 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.40 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.39 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.38 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.37 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.36 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.35 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.34 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.33 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.32 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.31 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.30 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.29 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.28 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.27 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.26 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.25 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.24 app/controllers/caboose/page_block_field_values_controller.rb
caboose-cms-0.3.23 app/controllers/caboose/page_block_field_values_controller.rb