Class: ActiveSync::ModelsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/active_sync/models_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



10
11
12
13
# File 'app/controllers/active_sync/models_controller.rb', line 10

def create
  #TODO some oversite on what can be created for sync records
  render json: model.create(params.permit(model.sync_attributes)).id
end

#updateObject



4
5
6
7
8
# File 'app/controllers/active_sync/models_controller.rb', line 4

def update
  #TODO some oversite on what can be edited for sync records
  model.find(params[:id]).update(params.permit(model.sync_attributes))
  head :no_content
end