Sha256: a921ea3acfcd04894788832e11cce35366b703551e391f56d3f9757eeb5e65d1

Contents?: true

Size: 232 Bytes

Versions: 5

Compression:

Stored size: 232 Bytes

Contents

class WidgetFaq < Widget
  has_many :faqs,
    :dependent => :destroy
  accepts_nested_attributes_for :faqs,
    :allow_destroy => true

  def clone
    cloned = super
    cloned.faqs = faqs.map(&: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/widget_faq.rb
forgeos_cms-1.9.4 app/models/widget_faq.rb
forgeos_cms-1.9.2 app/models/widget_faq.rb
forgeos_cms-1.9.1 app/models/widget_faq.rb
forgeos_cms-1.9.0 app/models/widget_faq.rb