APIdock / Ruby on Rails
/
Browse About
method

changed

rails latest stable - Class: ActiveModel::Dirty
changed()
public

Returns an array with the name of the attributes with unsaved changes.

person.changed # => []
person.name = 'bob'
person.changed # => ["name"]
# File activemodel/lib/active_model/dirty.rb, line 288
    def changed
      mutations_from_database.changed_attribute_names
    end

Related methods

  • Instance methods
  • *_change
  • *_changed?
  • *_previous_change
  • *_previously_changed?
  • *_previously_was
  • *_was
  • *_will_change!
  • as_json
  • attribute_changed?
  • attribute_changed_in_place?
  • attribute_previously_changed?
  • attribute_previously_was
  • attribute_was
  • changed
  • changed?
  • changed_attributes
  • changes
  • changes_applied
  • clear_attribute_changes
  • clear_changes_information
  • initialize_dup
  • previous_changes
  • restore_*!
  • restore_attributes
  • Private methods
  • privateattribute_change
  • privateattribute_previous_change
  • privateattribute_will_change!
  • privateclear_attribute_change
  • privateforget_attribute_assignments
  • privateinit_internals
  • privatemutations_before_last_save
  • privatemutations_from_database
  • privaterestore_attribute!
APIdock API Documentation Browser

© 2026 APIdock