Sha256: 6ba57b2255c0e1cf95d5eec22fabb043eaa6161d70fd686fd36b9316d23b8d6a

Contents?: true

Size: 418 Bytes

Versions: 17

Compression:

Stored size: 418 Bytes

Contents

module CmPageBuilder
  module Rails
    module HasCmContent
      extend ActiveSupport::Concern

      included do
        has_one :page, as: :container, dependent: :destroy, class_name:"CmPageBuilder::Rails::Page"
        has_many :page_components, through: :page

        delegate :save_content, to: :page


        after_find do
          self.create_page! unless self.page
        end
      end

    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
cm_page_builder-0.2.3 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-0.2.2 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.2.2 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.2.1 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.2.0 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.12 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.11 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.10 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.9 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.8 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.7 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.6 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.4 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.3 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.2 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.1 app/models/concerns/cm_page_builder/rails/has_cm_content.rb
cm_page_builder-rails-0.1.0 app/models/concerns/cm_page_builder/rails/has_cm_content.rb