Sha256: 729ff42e7bc2907fa44031430f4d3ab37ff5f83deb499d209bf91cd305e6366d
Contents?: true
Size: 871 Bytes
Versions: 7
Compression:
Stored size: 871 Bytes
Contents
class AwesomeTranslations::CacheDatabaseGenerator::Group < BazaModels::Model attr_writer :at_group belongs_to :handler, class_name: "AwesomeTranslations::CacheDatabaseGenerator::Handler" has_many :handler_translations, dependent: :destroy, foreign_key: "group_id", # rubocop:disable Rails/RedundantForeignKey class_name: "AwesomeTranslations::CacheDatabaseGenerator::HandlerTranslation" has_many :translation_keys, dependent: :destroy, foreign_key: "group_id", # rubocop:disable Rails/RedundantForeignKey class_name: "AwesomeTranslations::CacheDatabaseGenerator::TranslationKey" validates_presence_of :name, :handler def at_handler @at_handler ||= handler.at_handler end def at_group @at_group ||= AwesomeTranslations::Group.find_by(handler: at_handler, id: identifier) end def to_param identifier end end
Version data entries
7 entries across 7 versions & 1 rubygems