X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/14936150ac8ab5cb4e8347b772b2c966f2add43f..f4d84c48062a18f7f93b0d12a04c8e15c7f57e23:/app/models/language.rb diff --git a/app/models/language.rb b/app/models/language.rb index f346c8a74..f1d40feea 100644 --- a/app/models/language.rb +++ b/app/models/language.rb @@ -8,8 +8,6 @@ # class Language < ApplicationRecord - self.primary_key = "code" - has_many :diary_entries, :foreign_key => "language", :inverse_of => :language def self.load(file) @@ -28,7 +26,7 @@ class Language < ApplicationRecord 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