From d14700c51d692335f001a93c2f6b13b135783206 Mon Sep 17 00:00:00 2001 From: IN COMMON Collective Date: Thu, 8 Apr 2021 16:34:15 +0200 Subject: [FIX] Use form model to create/edit resources (fixes #4, fixes #5, refs #3) Since we must associate other models (e.g., classifications) to a Resource, we use a composite model to save all changes inside a database transaction. This approach makes it simpler to handle resources and their associations. Work remains to fix the geolocation and reverse geolocation to ensure these are in sync. --- app/models/classification.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/classification.rb') diff --git a/app/models/classification.rb b/app/models/classification.rb index 0754054..e2b180f 100644 --- a/app/models/classification.rb +++ b/app/models/classification.rb @@ -5,4 +5,6 @@ class Classification < ApplicationRecord belongs_to :resource belongs_to :section + + self.primary_key = :resource_id end -- cgit v1.2.3