Skip to content

Commit 8ac1c7b

Browse files
committed
wip removed debugging code for regression test
1 parent 30cb366 commit 8ac1c7b

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def find_inverse(model) # private
128128
next if association.attribute == attribute
129129
return association if the_klass == association.owner_class
130130
end
131-
debugger if options[:polymorphic]
132131
raise "could not find inverse of polymorphic belongs_to: #{model.inspect} #{self.inspect}" if options[:polymorphic]
133132
# instead of raising an error go ahead and create the inverse relationship if it does not exist.
134133
# https://github.com/hyperstack-org/hyperstack/issues/89
@@ -147,7 +146,6 @@ def find_inverse(model) # private
147146
def klass(model = nil)
148147
@klass ||= Object.const_get(@klass_name) if @klass_name
149148
raise "model is not correct class" if @klass && model && model.class != @klass
150-
debugger unless @klass || model
151149
raise "no model supplied for polymorphic relationship" unless @klass || model
152150
@klass || model.class
153151
end

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ def send_save_to_server(save, validate, force, &block)
298298
promise.resolve response # TODO this could be problematic... there was no .json here, so .... what's to do?
299299

300300
rescue Exception => e
301-
# debugger
302301
log("Exception raised while saving - #{e}", :error)
303302
ensure
304303
backing_records.each { |_id, record| record.saved! rescue nil } if save

ruby/hyper-model/lib/reactive_record/server_data_cache.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def [](*vector)
133133
vector[1..-1].inject(root) { |cache_item, method| cache_item.apply_method method if cache_item }
134134
final = vector[1..-1].inject(root) { |cache_item, method| cache_item.apply_method method if cache_item }
135135
next final unless final && final.value.respond_to?(:superclass) && final.value.superclass <= ActiveRecord::Base
136-
binding.pry
137136
Hyperstack::InternalPolicy.raise_operation_access_violation(:invalid_vector, "attempt to insecurely access relationship #{vector.last}.")
138137
end
139138
end
@@ -496,8 +495,8 @@ def self.load_from_json(tree, target = nil)
496495
end
497496
load_from_json(value, new_target) if new_target
498497
end
499-
#rescue Exception => e
500-
# raise e
498+
rescue Exception => e
499+
raise e
501500
end
502501
end
503502
end

0 commit comments

Comments
 (0)