instance method clone_attributes

Ruby on Rails 2.3.18

Last seen in v3.1.12 Private — implementation detail, not part of the public API

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12

Signature

clone_attributes(reader_method = :read_attribute, attributes = {})

No documentation comment.

Parameters

reader_method opt = :read_attribute
attributes opt = {}
Source
# File activerecord/lib/active_record/base.rb, line 3193
      def clone_attributes(reader_method = :read_attribute, attributes = {})
        self.attribute_names.inject(attributes) do |attrs, name|
          attrs[name] = clone_attribute_value(reader_method, name)
          attrs
        end
      end

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

Defined in ActiveRecord::Base

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close