Skip to content

Commit 3ad2f86

Browse files
committed
fixed issued caused by ruby 3 hash keyword arguments transformation deprecation
1 parent 60f0031 commit 3ad2f86

File tree

1 file changed

+7
-1
lines changed
  • app/concepts/matestack/ui/core/collection

1 file changed

+7
-1
lines changed

app/concepts/matestack/ui/core/collection/helper.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ def get_collection_order collection_id, key=nil
9191
end
9292
end
9393

94-
def set_collection id: nil, init_offset: 0, init_limit: nil, base_count: nil, filtered_count: nil, data: nil
94+
# since ruby 3 changed hash <-> keyword argument transformation, we need to
95+
# adjust this method call in order to stay compatible with ruby 2.x and ruby 3.x
96+
def set_collection options_hash
97+
_set_collection **options_hash
98+
end
99+
100+
def _set_collection id: nil, init_offset: 0, init_limit: nil, base_count: nil, filtered_count: nil, data: nil
95101
@collections = {} if @collections.nil?
96102

97103
collection_config = CollectionConfig.new(

0 commit comments

Comments
 (0)