Skip to content

Commit 33659fc

Browse files
committed
trying destroy fix as well
1 parent d26df50 commit 33659fc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ruby/hyper-model/lib/reactive_record/active_record/public_columns_hash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module ActiveRecord
88
class Base
99
@@hyper_stack_public_columns_hash_mutex = Mutex.new
1010
def self.public_columns_hash
11-
@@hyper_stack_public_columns_hash_mutext.synchronize do
11+
@@hyper_stack_public_columns_hash_mutex.synchronize do
1212
return @public_columns_hash if @public_columns_hash && Rails.env.production?
1313
files = []
1414
Hyperstack.public_model_directories.each do |dir|

ruby/hyper-model/lib/reactive_record/active_record/reactive_record/isomorphic_base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,14 @@ def destroy(&block)
558558
Operations::Destroy.run(model: ar_instance.model_name.to_s, id: id, vector: vector)
559559
.then do |response|
560560
Broadcast.to_self ar_instance
561+
@destroyed = true
561562
yield response[:success], response[:message] if block
562563
promise.resolve response
563564
end
564565
else
565566
destroy_associations
566567
# sync_unscoped_collection! # ? should we do this here was NOT being done before hypermesh integration
568+
@destroyed = true
567569
yield true, nil if block
568570
promise.resolve(success: true)
569571
end
@@ -575,8 +577,6 @@ def destroy(&block)
575577
# sync!
576578
# and modify server_data_cache so that it does NOT call destroy
577579

578-
@destroyed = true
579-
580580
promise
581581
end
582582

0 commit comments

Comments
 (0)