Sha256: 423a756d91c8adbcbf7e175849a1764ef52fd9273286298d535c100da037bf45
Contents?: true
Size: 493 Bytes
Versions: 78
Compression:
Stored size: 493 Bytes
Contents
module Uid extend ActiveSupport::Concern included do field :uid, :string validates_presence_of :uid unless Fullstack::Cms.config.localize index :uid, :unique => true scope :uid, lambda {|uid| where(:uid => uid).first} else index [:uid, :locale], :unique => true scope :uid, lambda {|uid| where(:uid => uid, :locale => (I18n.locale || Fullstack::Cms::config.default_locale).to_s).first} end end end
Version data entries
78 entries across 78 versions & 1 rubygems