Method: Scimitar::ResourcesController#replace

Defined in:
app/controllers/scimitar/resources_controller.rb

#replace(&block) ⇒ Object

PUT (replace)

Similar to #create, but you’re passed an ID to find as well as the resource details to then use for all replacement attributes in that found resource. See also e.g. Scimitar::Resources::Mixin#from_scim!.

Evaluate to the SCIM representation of the arising created record.



91
92
93
94
95
# File 'app/controllers/scimitar/resources_controller.rb', line 91

def replace(&block)
  with_scim_resource() do |resource|
    render(json: yield(self.safe_params()[:id], resource))
  end
end