X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/466de96a91ece362400ec7ffe73ed243f9ce3067..26f6fdf82c93b0fd3198bb8929d5f20a4723bfe8:/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