Class: TranslationKeyResource

Inherits:
ApplicationRecord show all
Defined in:
app/models/translation_key_resource.rb

Overview

== Schema Information

Table name: translation_key_resources
Database name: primary

id :bigint not null, primary key
resource_attribute :string
resource_type :string not null
created_at :datetime not null
updated_at :datetime not null
resource_id :string not null
translation_key_id :integer not null

Indexes

idx_translation_key_resources_unique1 (translation_key_id,resource_type,resource_id) UNIQUE WHERE (resource_attribute IS NULL)
idx_translation_key_resources_unique2 (translation_key_id,resource_type,resource_id,resource_attribute) UNIQUE WHERE (resource_attribute IS NOT NULL)
index_translation_key_resources_on_translation_key_id (translation_key_id)

Foreign Keys

fk_rails_... (translation_key_id => translation_keys.id) ON DELETE => cascade

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#resourceResource

Returns:

  • (Resource)

See Also:



26
# File 'app/models/translation_key_resource.rb', line 26

belongs_to :resource, polymorphic: true

#translation_keyTranslationKey



25
# File 'app/models/translation_key_resource.rb', line 25

belongs_to :translation_key