Sha256: 49a20790679ca5b89e78242d621057335878cd647c587428fabb7d59be5a0e79

Contents?: true

Size: 233 Bytes

Versions: 2

Compression:

Stored size: 233 Bytes

Contents

class <%= "#{class_name}Translation" %> < ActiveRecord::Base
 
  belongs_to <%= ":#{singular_table_name}" %>
 
  validates :locale, presence: true
  validates <%= ":#{singular_table_name}_id" %>, uniqueness: { scope: :locale }
 
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
translatable_records-1.1.4 lib/generators/templates/model.rb
translatable_records-1.1.2 lib/generators/templates/model.rb