Method: Superstore::Core#initialize_dup

Defined in:
lib/superstore/core.rb

#initialize_dup(other) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/superstore/core.rb', line 19

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