Sha256: 7982496832dc9f9e52d2ed91563542271ac0ec5da8f202be12c3a187a4723c62
Contents?: true
Size: 383 Bytes
Versions: 2
Compression:
Stored size: 383 Bytes
Contents
class TranslatedWord < ActiveRecord::Base validates :translatable, presence: true validates :key, presence: true validates :locale, presence: true, uniqueness: { scope: [:translatable_type, :translatable_id, :key] } validates :value, presence: true belongs_to :translatable, polymorphic: true def pretty_format "#{locale}: #{value}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ar-translatable-0.2.0 | app/models/translated_word.rb |
ar-translatable-0.1.0 | app/models/translated_word.rb |