Sha256: 2cb95e6b013ca9c16dbf6aea1a1dc8a8edec940371fe36499120ada20bac3ad7
Contents?: true
Size: 500 Bytes
Versions: 11
Compression:
Stored size: 500 Bytes
Contents
require 'tengine/core' class Tengine::Core::Setting include Mongoid::Document include Tengine::Core::FindByName field :name, :type => String field :value validates :name, :presence => true, :uniqueness => true index :name, :unique => true class << self def dsl_version document = first(:conditions => {:name => "dsl_version"}) raise Mongoid::Errors::DocumentNotFound.new(Tengine::Core::Setting, "dsl_version") unless document document.value end end end
Version data entries
11 entries across 11 versions & 1 rubygems