Sha256: 4d4919f6a16e1cc7626c42cf2883c4fef51764d7086f7f75130109db232f45d9
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
require "protected_attributes" if ActiveRecord::VERSION::MAJOR >= 4 class TranslationText < ActiveRecord::Base belongs_to :translation_key, :class_name => 'TranslationKey' validates_presence_of :locale validates_uniqueness_of :locale, :scope=>:translation_key_id attr_accessible :text, :locale, :translation_key, :translation_key_id after_update :expire_cache protected def expire_cache FastGettext.expire_cache_for(translation_key.key) end end
Version data entries
5 entries across 5 versions & 1 rubygems