Sha256: 64a3a59aa34922ce126cf6d12a08fddf11c4359ba7be4b2a79f86567fbf0c767

Contents?: true

Size: 647 Bytes

Versions: 7

Compression:

Stored size: 647 Bytes

Contents

class AwesomeTranslations::CacheDatabaseGenerator::Handler < BazaModels::Model
  has_many :groups,
    dependent: :destroy,
    foreign_key: "handler_id", # rubocop:disable Rails/RedundantForeignKey
    class_name: "AwesomeTranslations::CacheDatabaseGenerator::Group"

  has_many :handler_translations,
    dependent: :destroy,
    foreign_key: "handler_id", # rubocop:disable Rails/RedundantForeignKey
    class_name: "AwesomeTranslations::CacheDatabaseGenerator::HandlerTranslation"

  validates_presence_of :name

  def at_handler
    @at_handler ||= AwesomeTranslations::Handler.find(identifier)
  end

  def to_param
    identifier
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
awesome_translations-0.0.66 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.65 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.64 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.63 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.62 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.61 lib/awesome_translations/cache_database_generator/handler.rb
awesome_translations-0.0.60 lib/awesome_translations/cache_database_generator/handler.rb