X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dcfe326f6515cc7aeb9c02b7536e69863c60cd01..225b260640a0c17f3ae408c70987618ceb07fa0d:/app/models/language.rb?ds=sidebyside diff --git a/app/models/language.rb b/app/models/language.rb index bb1aa4bd2..1158721e8 100644 --- a/app/models/language.rb +++ b/app/models/language.rb @@ -7,10 +7,10 @@ # native_name :string # -class Language < ActiveRecord::Base +class Language < ApplicationRecord self.primary_key = "code" - has_many :diary_entries, :foreign_key => "language" + has_many :diary_entries, :foreign_key => "language", :inverse_of => :language def self.load(file) Language.transaction do