Sha256: a379c3287bce3d6443fcf6e3ded694e892ec2069b74cea24368b07ff05361f2b

Contents?: true

Size: 376 Bytes

Versions: 10

Compression:

Stored size: 376 Bytes

Contents

module Kuztuscms
  class Setting < ActiveRecord::Base
    validates :value, :presence => true
    validates :key, :uniqueness => true, 
                    :format => { :with => /\A[a-z0-9_-]+\z/, :message => "Only lowercase letters, numbers and dashes allowed"},
                    :presence => true
    after_save do
      Kuztuscms::Settings.clear_cache
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuztuscms-0.0.10 app/models/kuztuscms/setting.rb
kuztuscms-0.0.9 app/models/kuztuscms/setting.rb
kuztuscms-0.0.8 app/models/kuztuscms/setting.rb
kuztuscms-0.0.7 app/models/kuztuscms/setting.rb
kuztuscms-0.0.6 app/models/kuztuscms/setting.rb
kuztuscms-0.0.5 app/models/kuztuscms/setting.rb
kuztuscms-0.0.4 app/models/kuztuscms/setting.rb
kuztuscms-0.0.3 app/models/kuztuscms/setting.rb
kuztuscms-0.0.2 app/models/kuztuscms/setting.rb
kuztuscms-0.0.1 app/models/kuztuscms/setting.rb