Sha256: d36281b6b6af8534cbc051d11e36c9ec80c0ece7201a97f0a27ab5a4135ba564
Contents?: true
Size: 270 Bytes
Versions: 2
Compression:
Stored size: 270 Bytes
Contents
class TranslatableTranslation < ActiveRecord::Base belongs_to :translatables validates :locale, presence: true validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) } validates :translatable_id, uniqueness: { scope: :locale } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slugs-1.2.3 | test/dummy/app/models/translatable_translation.rb |
slugs-1.1.0 | test/dummy/app/models/translatable_translation.rb |