We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4c81ca6 + 99cbaab commit 998c199Copy full SHA for 998c199
lib/liquid-rails/drops/collection_drop.rb
@@ -29,9 +29,9 @@ def self.scope(*scope_names)
29
delegate :total_count, :total_pages, to: :objects
30
31
def initialize(objects, options={})
32
- options.assert_valid_keys(:with)
+ options.assert_valid_keys(:with, :scope)
33
34
- @objects = objects
+ @objects = options[:scope].nil? ? objects : objects.send(options[:scope])
35
@drop_class_name = options[:with]
36
end
37
0 commit comments