Skip to content

Commit f4a27dd

Browse files
committed
closes #84
1 parent 73e1ac3 commit f4a27dd

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ def [](index)
8383

8484
def ==(other_collection)
8585
observed
86-
# https://github.com/hyperstack-org/hyperstack/issues/84
87-
# the following seems wrong. It results in loading collection (i.e. @collection is nil) being equal to anything that is not a collection!!!
88-
# TODO: try changing to something more robust like `return (@collection || []) == other_collection unless other_collection.is_a? collection
86+
# handle special case of other_collection NOT being a collection (typically nil)
8987
return (@collection || []) == other_collection unless other_collection.is_a? Collection
9088
other_collection.observed
9189
# if either collection has not been created then compare the vectors

ruby/hyper-model/spec/batch4/scope_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,7 @@ class << self
415415
end
416416
end
417417
end
418-
# https://github.com/hyperstack-org/hyperstack/issues/84
419-
# currently page will initially show that @scope == @previous_scope even though
420-
# previous scope is nil
421-
# once issue 84 is fixed uncomment the following line
418+
# following line tests https://github.com/hyperstack-org/hyperstack/issues/84
422419
page.should have_content('current scope != previous_scope')
423420
evaluate_ruby do
424421
TestComponent2.scope = :active

0 commit comments

Comments
 (0)