Sha256: 7a6be82cf7a32223e87b28a8ea770834620ab494a692bb54d4f7b992c8a1c96a
Contents?: true
Size: 878 Bytes
Versions: 12
Compression:
Stored size: 878 Bytes
Contents
require 'reactive_record/server_data_cache' module ReactiveRecord class ReactiveRecordController < ::ApplicationController def fetch render :json => ReactiveRecord::ServerDataCache[ (params[:models] || []).map(&:with_indifferent_access), (params[:associations] || []).map(&:with_indifferent_access), params[:pending_fetches], acting_user ] end def save render :json => ReactiveRecord::Base.save_records( (params[:models] || []).map(&:with_indifferent_access), (params[:associations] || []).map(&:with_indifferent_access), acting_user, params[:validate], true ) end def destroy render :json => ReactiveRecord::Base.destroy_record( params[:model], params[:id], params[:vector], acting_user ) end end end
Version data entries
12 entries across 12 versions & 1 rubygems