Sha256: a7b1831dddb78e1900fe58e80c956cbbc59c86477b04771774ef86823b92b8e8
Contents?: true
Size: 515 Bytes
Versions: 14
Compression:
Stored size: 515 Bytes
Contents
class Ecm::Cms::Template < ActiveRecord::Base # add shared behaviour for database backed templates include Ecm::Cms::DatabaseTemplate # associations belongs_to :ecm_cms_folder, class_name: 'Ecm::Cms::Folder', foreign_key: 'ecm_cms_folder_id' # callbacks before_validation :ensure_basename_starts_without_underscore, if: proc { |t| t.basename.present? } private def ensure_basename_starts_without_underscore basename.slice!(0) if basename.start_with?('_') end end
Version data entries
14 entries across 14 versions & 1 rubygems