Method: Scimitar::ResourcesController#create
- Defined in:
- app/controllers/scimitar/resources_controller.rb
#create(&block) ⇒ Object
POST (create)
Call with a block that is passed a SCIM resource instance - e.g a Scimitar::Resources::User instance - representing an item to be created. Your ::storage_class class’s ::scim_resource_type method determines the kind of object you’ll be given.
See also e.g. Scimitar::Resources::Mixin#from_scim!.
Evaluate to the SCIM representation of the arising created record.
77 78 79 80 81 |
# File 'app/controllers/scimitar/resources_controller.rb', line 77 def create(&block) with_scim_resource() do |resource| render(json: yield(resource, :create), status: :created) end end |