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.20.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.19.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.18.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.17.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.15.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.14.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.13.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.12.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.11.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.10.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.9.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.8.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.7.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.6.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.5.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.4.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.3.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.2.pre app/models/cmor/cms/template.rb
cmor_cms-0.0.1.pre app/models/cmor/cms/template.rb