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