Update every Resource in the Collection

   Person.all(:age.gte => 21).update(:allow_beer => true)

 @param [Hash] attributes
   attributes to update with

 @return [Boolean]
   true if the resources were successfully updated

 @api public
358099
def update(attributes)
      assert_update_clean_only(:update)

      dirty_attributes = model.new(attributes).dirty_attributes
      dirty_attributes.empty? || all? { |resource| resource.update(attributes) }
    end
799663
def arquire_attributes(self, attributes, active=True):
        
        attribute_update = self._post_object(self.update_api.attributes.acquire, attributes)
        return ExistAttributeResponse(attribute_update)
189591
def add(name, resource, attributes = {})
      resources[name] = resource
      resource.update_attributes(attributes) if attributes.any?
      resource
    end
1253167
def update(client_id, key, value)
      @clients.each do |hash|
        if hash[:client_id] == client_id
          hash[key] = value
        end
      end
    end
1187754
def update_attribute(key, value)
      unless attribute?(key.to_sym)
        raise Error::UnknownAttribute.new(attribute: key)
      end

      _attributes[key.to_sym] = value
    end
1255248
def update_attribute(attr,**kwargs):
    

    log.debug("Updating attribute: %s", attr.name)
    attr_i = _get_attr(attr.id)
    attr_i.name = attr.name
    attr_i.dimension_id = attr.dimension_id
    attr_i.description = attr.description

    #Make sure an update hasn't caused an inconsistency.
    #check_sion(attr_i.id)

    db.DBSession.flush()
    return JSONObject(attr_i)
1049863
def update_used_images
      ActionController::Base.new.expire_fragment(self)
      image_ids = self.used_images
      if !image_ids.nil?
        Picture.where(id: image_ids).each do |picture|
          picture.update_attributes(article_id: self.id)
        end
      end
    end
479818
def attributes
      _attributes.inject(HashWithIndifferentAccess.new) do |hash, attribute|
        hash.update attribute => send(attribute)
      end
    end
527149
def update_fields
      return true unless params[:fields] 
      params[:fields].each do |id, value|
        field = @post.post_fields.find_by(id: id)
        return false unless field
        return false unless update_field(field, value)
      end
      true
    end
1027216
def update(self, auth, resource, desc={}, defer=False):
        
        return self._call('update', auth, [resource, desc], defer)
551255
def update_or_create(self, attributes, values=None):
        
        instance = self.first_or_new(**attributes)

        instance.fill(values)

        instance.save()

        return instance
73980
def assign_attributes(new_attributes)
      if !new_attributes.respond_to?(:stringify_keys)
        raise ArgumentError, "When assigning attributes, you must pass a hash as an argument."
      end
      return if new_attributes.empty?

      # stringify keys just like https://github.com/rails/rails/blob/4f99a2186479d5f77460622f2c0f37708b3ec1bc/activemodel/lib/active_model/attribute_assignment.rb#L34
      new_attributes.stringify_keys.each do |k, v|
        setter = :"#{k}="
        if respond_to?(setter)
          public_send(setter, v)
        else
          _attr_json_write_unknown_attribute(k, v)
        end
      end
    end
134557
def update(properties, raw = false)
      properties.each do |property, value|
        update_property(property, value, raw)
      end
    end
810857
def update(args = {})
      # hash arguments kept for backwards compatibility
      return @data if args.empty?

      org = args[:organization] || account.username
      box_name = args[:name] || @name

      data = @client.request('put', box_path(org, box_name), box: args)

      # Update was called on *this* object, so update
      # objects data locally
      @data = data if !args[:organization] && !args[:name]
      data
    end
166108
def _update_record(attribute_names = @attributes.keys)
        # check if class has custom update method
        if self.class.custom_update_method
          # run before/after callbacks defined in model
          run_callbacks(:update) do
            # timestamp
            if should_record_timestamps?
              current_time = current_time_from_proper_timezone

              timestamp_attributes_for_update_in_model.each do |column|
                column = column.to_s
                next if will_save_change_to_attribute?(column)
                write_attribute(column, current_time)
              end
            end
            # update just dirty attributes
            if partial_writes?
              # Serialized attributes should always be written in case they've been
              # changed in place.
              update_using_custom_method(changed | (attributes.keys & self.class.columns.select { |column| column.is_a?(Type::Serialized) }))
            else
              update_using_custom_method(attributes.keys)
            end
          end
        else
          super
        end
      end
948758
def remote_update(attribute_names = @attributes.keys)
      run_callbacks :update do
        # Use the getter here so we get the type casting.
        updated_attributes = attributes
        updated_attributes.slice!(*attribute_names)
        updated_attributes.merge!(scope_key_hash)

        remote(:update, updated_attributes)
      end
    end
20219
def update_attributes(atts)
      atts.delete('_type')
      atts.each { |att, val| send(:"#{att}=", val) }
    end