lib/ury_rapid/model/model_object.rb
# Default implementation of insert
#
# This will, by default, move the incoming resource to this object
# under the given ID, replacing any existing resource.
#
# @param id [Object] The ID to POST the resource under.
# @param resource [Object] The resource to POST.
#
# @return [void]
Default implementation of insert
This will, by default, move the incoming resource to this object
under the given ID, replacing any existing resource.
Default implementation of insert This will by default move the incoming resource to this object under the given ID replacing any existing resource .
def insert(id, resource)
        return if resource.nil?
        resource.move_to(self, id)
        resource.notify_update
      end
def insert ( id , resource ) return if resource . nil? resource . move_to ( self , id ) resource . notify_update end
Default implementation of insert
This will, by default, move the incoming resource to this object
under the given ID, replacing any existing resource.
Default implementation of insert This will by default move the incoming resource to this object under the given ID replacing any existing resource .
None
void
id
The ID to POST the resource under.
The ID to POST the resource under .
resource
The resource to POST.
The resource to POST .