Sha256: 440d572cb39c671810bde2584f6570d75ea69fc22e4a48162ea73a2d29152a53

Contents?: true

Size: 249 Bytes

Versions: 2

Compression:

Stored size: 249 Bytes

Contents

class ModelTranslation < ActiveRecord::Base
  
  belongs_to :models
  
  validates :locale, presence: true    
  validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }
  validates :model_id, uniqueness: { scope: :locale }  
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
translatable_records-1.0.7 test/dummy/app/models/model_translation.rb
translatable_records-1.0.6 test/dummy/app/models/model_translation.rb