Sha256: d84e12979405fdf7a818493fdbd7d37be24c72fc3c97883f7f3248e6d7769dd5

Contents?: true

Size: 469 Bytes

Versions: 13

Compression:

Stored size: 469 Bytes

Contents

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 if ActiveRecord::VERSION::MAJOR == 3 || defined?(ProtectedAttributes)
  after_update :expire_cache

  protected

  def expire_cache
    FastGettext.expire_cache_for(translation_key.key)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fast_gettext-1.8.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.7.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.1.2 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.1.1 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.6.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.5.1 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.5.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.4.1 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.4.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.3.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.2.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.1.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb
fast_gettext-1.0.0 lib/fast_gettext/translation_repository/db_models/translation_text.rb