Sha256: e76884cd301b09c7d8e3eca3c8e772c2ee33271c3ce2c0d80e93bb0e090663e6
Contents?: true
Size: 547 Bytes
Versions: 10
Compression:
Stored size: 547 Bytes
Contents
module Kuztuscms class Template < ActiveRecord::Base validates :body, :path, :presence => true validates :path, :format => { :with => /\A[a-z0-9_-]+\z/, :message => "Only lowercase letters, numbers and dashes allowed"} validates :format, :inclusion => Mime::SET.symbols.map(&:to_s) validates :locale, :inclusion => I18n.available_locales.map(&:to_s) validates :handler, :inclusion => ActionView::Template::Handlers.extensions.map(&:to_s) after_save do Kuztuscms::Resolver.instance.clear_cache end end end
Version data entries
10 entries across 10 versions & 1 rubygems