Sha256: 235010e7235a75a0f027134fca5338fdd4396c7102448cea21b398184b47568d

Contents?: true

Size: 378 Bytes

Versions: 39

Compression:

Stored size: 378 Bytes

Contents

class Cmor::Cms::Template < ActiveRecord::Base
  # add shared behaviour for database backed templates
  include Cmor::Cms::DatabaseTemplate

  # 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

39 entries across 39 versions & 1 rubygems

Version Path
cmor_cms-0.0.41.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.40.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.39.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.38.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.37.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.36.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.35.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.34.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.33.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.32.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.31.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.30.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.29.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.28.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.27.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.26.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.25.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.24.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.22.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.21.pre app/models/cmor/cms/template.rb