app/helpers/blacklight/component_helper_behavior.rb in blacklight-8.3.0 vs app/helpers/blacklight/component_helper_behavior.rb in blacklight-8.4.0
- old
+ new
@@ -35,10 +35,14 @@
def document_actions(document, options: {})
filter_partials(blacklight_config.view_config(:show).document_actions, { document: document }.merge(options)).map { |_k, v| v }
end
+ def filter_partials(partials, options)
+ partials.select { |_, config| blacklight_configuration_context.evaluate_if_unless_configuration config, options }
+ end
+
private
def render_filtered_partials(partials, options = {})
content = []
filter_partials(partials, options).each do |key, config|
@@ -49,12 +53,8 @@
else
content << rendered
end
end
safe_join(content, "\n") unless block_given?
- end
-
- def filter_partials(partials, options)
- partials.select { |_, config| blacklight_configuration_context.evaluate_if_unless_configuration config, options }
end
end
end