Method: Superstore::Core#initialize_dup

Defined in:
lib/superstore/core.rb

#initialize_dup(other) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/superstore/core.rb', line 14

def initialize_dup(other)
  @attributes = other.attributes
  @attributes['created_at'] = nil
  @attributes['updated_at'] = nil
  @attributes.delete(self.class.primary_key)
  @id = nil
  @new_record = true
  @destroyed = false
  super
end