#
class Language < ApplicationRecord
- self.primary_key = "code"
-
has_many :diary_entries, :foreign_key => "language", :inverse_of => :language
def self.load(file)
def name
name = english_name
- name += " (#{native_name})" unless native_name.nil?
+ name += " (#{native_name})" unless native_name.nil? || native_name == english_name
name
end
end