Sha256: 2711082d08304f9de7cc43dd7a56def58cb78ee87fc3387214c3601f9dd063fd

Contents?: true

Size: 306 Bytes

Versions: 5

Compression:

Stored size: 306 Bytes

Contents

class Carousel < Widget
  has_many  :items,
    :class_name => 'CarouselItem',
    :dependent => :destroy,
    :order => 'position'
  accepts_nested_attributes_for :items,
    :allow_destroy => true

  def clone
    cloned = super
    cloned.items = self.items.collect(&:clone)
    return cloned
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
forgeos_cms-1.9.5.rc1 app/models/carousel.rb
forgeos_cms-1.9.4 app/models/carousel.rb
forgeos_cms-1.9.2 app/models/carousel.rb
forgeos_cms-1.9.1 app/models/carousel.rb
forgeos_cms-1.9.0 app/models/carousel.rb