fixed bugfix where another user could not store the same object again

fixed the primary keys => all the classes have now composite primary key which contais an id + user_id, necessary gem: 'composite_primary_keys'
fixed the user_id relation => every class now "belongs_to" user

pls kill me know
This commit is contained in:
Pfingstfrosch
2020-06-05 00:35:04 +02:00
parent 1e87036094
commit ca38d7260d
12 changed files with 38 additions and 36 deletions
+3
View File
@@ -37,6 +37,9 @@ gem 'devise-encryptable', '0.2.0'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
# for composite primary keys
gem 'composite_primary_keys'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]