Sha256: b397c72db9bcc8a65d2be494cfe856b8fbe755264b9b64665f25f11f075bf02a

Contents?: true

Size: 209 Bytes

Versions: 3

Compression:

Stored size: 209 Bytes

Contents

class <%= class_name %>Translation < ActiveRecord::Base

  belongs_to :<%= singular_table_name %>

  validates_presence_of :locale
  validates_uniqueness_of :<%= singular_table_name %>_id, scope: :locale

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
translatable_records-5.1.0 lib/generators/translation/templates/model.rb
translatable_records-4.0.0.1 lib/generators/translation/templates/model.rb
translatable_records-4.0.0.0 lib/generators/translation/templates/model.rb