Sha256: ee0da79f6bc440178f625a9a229723620e2d83e208768809921cf1aa2e8785ae

Contents?: true

Size: 227 Bytes

Versions: 2

Compression:

Stored size: 227 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

2 entries across 2 versions & 1 rubygems

Version Path
translatable_records-1.1.7 lib/generators/templates/model.rb
translatable_records-1.1.6 lib/generators/templates/model.rb