lib/mutils/serialization/results/main.rb in mutils-1.0.1 vs lib/mutils/serialization/results/main.rb in mutils-1.1.0
- old
+ new
@@ -27,10 +27,10 @@
result_hash.hash
end
def check_if_included(s_options, key)
- return s_options[:if].call(scope) unless s_options[:if].nil? || scope_is_collection?
+ return s_options[:if].call(scope, options[:params]) unless s_options[:if].nil? || scope_is_collection?
s_options[:always_include] || options[:includes]&.include?(key)
end
def scope_is_collection?