Sha256: 68273757017702a4e021ec2edbeb719c62f733d52c0d110973a2f9076402d666

Contents?: true

Size: 409 Bytes

Versions: 2

Compression:

Stored size: 409 Bytes

Contents

module Translatable
  class TranslatedWord < ActiveRecord::Base
    self.table_name = :translated_words

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar-translatable-0.0.2 lib/translatable/translated_word.rb
ar-translatable-0.0.1 lib/translatable/translated_word.rb