Class: Attribute

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/attribute.rb

Instance Method Summary collapse

Instance Method Details

#cloneObject



25
26
27
28
29
30
31
32
# File 'app/models/attribute.rb', line 25

def clone
  attribute = super
  attribute.attribute_values = self.attribute_values.collect(&:clone)
  %w(category_ids attachment_ids).each do |method|
    attribute.send("#{method}=",self.send(method))
  end
  attribute
end