X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/925d12cc8176414d0f9531832862a5825783d132..b8247478f4f772df8d09a29f3acd383fc6d32cf0:/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