Sha256: ff0605c2608fc6988c464cf04fb8c498187b4794aed62e5a582fe13ef7dddfe6
Contents?: true
Size: 734 Bytes
Versions: 20
Compression:
Stored size: 734 Bytes
Contents
module Ecm::Cms class Page::ContentBlock < ActiveRecord::Base # associations belongs_to :ecm_cms_content_box, class_name: 'ContentBox', foreign_key: 'ecm_cms_content_box_id' belongs_to :ecm_cms_page, class_name: 'Ecm::Cms::Page', foreign_key: 'ecm_cms_page_id' # attributes attr_accessible(:body, :ecm_cms_content_box_id) if Rails.version < '4.0.0' # validations validates :body, presence: true validates :ecm_cms_content_box, presence: true validates :ecm_cms_page, presence: true # validates :ecm_cms_page, :existence => true def content_box_name ecm_cms_content_box.name end end end
Version data entries
20 entries across 20 versions & 1 rubygems