Sha256: 7f845a0b4b2ae86ea8fbbb32f7152365944a61f6ec378a85c140b0820b4d25aa
Contents?: true
Size: 1.01 KB
Versions: 11
Compression:
Stored size: 1.01 KB
Contents
module PagesCms class PageBlock < ActiveRecord::Base belongs_to :page belongs_to :image #todo why is this here? has_many :text_boxes, dependent: :destroy has_many :markdown_texts, dependent: :destroy has_many :thumbnails, dependent: :destroy has_many :blog_feeds, dependent: :destroy has_many :image_boxes, dependent: :destroy has_many :contact_fields, dependent: :destroy accepts_nested_attributes_for :text_boxes, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :markdown_texts, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :thumbnails, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :blog_feeds, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :image_boxes, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :contact_fields, reject_if: :all_blank, allow_destroy: true end end
Version data entries
11 entries across 11 versions & 1 rubygems