lib/sdb/active_sdb.rb
# Removes specified attributes from the item.
# +attrs_list+ is an array or comma separated list of attributes names.
# Returns the list of deleted attributes.
# 
#  sandy = Client.find_by_name 'Sandy' 
#  sandy.reload
#  puts sandy.inspect                   #=> #<Client:0xb7761d28 @new_record=false, @attributes={"name"=>["Sandy"], "id"=>"b2832ce2-e461-11dc-b13c-001bfc466dd7", "toys"=>["boys", "kids", "patchwork"}>
#  puts sandy.delete_attributes('toys') #=> ['toys']
#  puts sandy.inspect                   #=> #<Client:0xb7761d28 @new_record=false, @attributes={"name"=>["Sandy"], "id"=>"b2832ce2-e461-11dc-b13c-001bfc466dd7"}>
#
Removes specified attributes from the item.
+attrs_list+ is an array or comma separated list of attributes names.
Returns the list of deleted attributes.


Removes specified attributes from the item . + attrs_list + is an array or comma separated list of attributes names . Returns the list of deleted attributes .
def delete_attributes(*attrs_list)
        raise_on_id_absence
        attrs_list = attrs_list.flatten.map{ |attribute| attribute.to_s }
        attrs_list.delete('id')
        unless attrs_list.right_blank?
          connection.delete_attributes(domain, id, attrs_list)
          attrs_list.each { |attribute| @attributes.delete(attribute) }
        end
        attrs_list
      end
def delete_attributes ( * attrs_list ) raise_on_id_absence attrs_list = attrs_list . flatten . map { | attribute | attribute . to_s } attrs_list . delete ( 'id' ) unless attrs_list . right_blank? connection . delete_attributes ( domain , id , attrs_list ) attrs_list . each { | attribute | @attributes . delete ( attribute ) } end attrs_list end
Removes specified attributes from the item.
Removes specified attributes from the item .
attrs_list
<not_specific>