Class: ReactiveRecord::ReactiveRecordController

Inherits:
ApplicationController show all
Defined in:
app/controllers/reactive_record/reactive_record_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



16
17
18
# File 'app/controllers/reactive_record/reactive_record_controller.rb', line 16

def destroy
  render :json => ReactiveRecord::Base.destroy_record(params[:model], params[:id], params[:vector])
end

#fetchObject



7
8
9
# File 'app/controllers/reactive_record/reactive_record_controller.rb', line 7

def fetch
  render :json => ReactiveRecord::ServerDataCache[params[:pending_fetches]]
end

#saveObject



12
13
14
# File 'app/controllers/reactive_record/reactive_record_controller.rb', line 12

def save
  render :json => ReactiveRecord::Base.save_records(params[:models], params[:associations])
end