Sha256: 1a3d25cdfddc6ec447022e990501b410d1e54db5e08abe041ca8f36831dd17be

Contents?: true

Size: 353 Bytes

Versions: 1

Compression:

Stored size: 353 Bytes

Contents

module Rosetta
  class TranslationKey < ApplicationRecord
    has_many :translations, dependent: :destroy
    # Note: Learn about the design decisions behind this: https://github.com/virolea/rosetta/issues/3
    has_one :translation_in_current_locale, -> { where(locale_id: Rosetta.locale.id) }, class_name: "Translation", dependent: :destroy
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rosetta-rails-0.1.1 app/models/rosetta/translation_key.rb