instance method update_attributes

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

update_attributes(attributes)

Updates all the attributes from the passed-in Hash and saves the record. If the object is invalid, the saving will fail and false will be returned.

Parameters

attributes req
Source
# File activerecord/lib/active_record/base.rb, line 2470
      def update_attributes(attributes)
        self.attributes = attributes
        save
      end

Defined in activerecord/lib/active_record/base.rb line 2470 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Base

Type at least 2 characters to search.

↑↓ navigate · open · esc close