app/models/page.rb in slices-1.0.3 vs app/models/page.rb in slices-1.0.4

- old
+ new

@@ -6,18 +6,22 @@ include Slices::Tree include Slices::PageAsJSON include Slices::HasSlices include Slices::HasAttachments::PageInstanceMethods + DESCRIPTION_DEPRECATION_WARNING = "Page#description is now meta_description. If you are upgrading, run 'rake slices:migrate:meta_description' to update." + field :name field :role # only relevant for virtual pages field :active, type: Boolean, default: false field :layout, type: String, default: 'default' field :meta_description field :title field :has_content, type: Boolean, default: false + belongs_to :author, class_name: 'Admin' + index :_keywords, background: true has_slices :slices has_and_belongs_to_many :assets @@ -162,15 +166,15 @@ end # End of added def description - ActiveSupport::Deprecation::warn "Page#description is now meta_description. If you are upgrading, run 'rake slices:migrate:meta_description' to update." + ActiveSupport::Deprecation::warn DESCRIPTION_DEPRECATION_WARNING meta_description end def description=(value) - ActiveSupport::Deprecation::warn "Page#description is now meta_description. If you are upgrading, run 'rake slices:migrate:meta_description' to update." + ActiveSupport::Deprecation::warn DESCRIPTION_DEPRECATION_WARNING self.meta_description = value end private def self.parent_from_attributes(attributes)