Sha256: 50a4763f78d6a5feb2e4f4adb7494456f92d3a7ea40246b9eebc806de132667f
Contents?: true
Size: 940 Bytes
Versions: 17
Compression:
Stored size: 940 Bytes
Contents
module Knitkit module ErpApp module Desktop class PositionController < Knitkit::ErpApp::Desktop::AppController def update model = DesktopApplication.find_by_internal_identifier('knitkit') begin current_user.with_capability('drag_item', 'WebsiteTree') do params[:position_array].each do |position| model = position['klass'].constantize.find(position['id']) model.position = position['position'].to_i model.save end render :json => {:success => true} end rescue ErpTechSvcs::Utils::CompassAccessNegotiator::Errors::UserDoesNotHaveCapability=>ex render :json => {:success => false, :message => ex.message} end end end#PositionController end#Desktop end#ErpApp end#Knitkit
Version data entries
17 entries across 17 versions & 1 rubygems