Sha256: 6c7a6fb3d70578874efd25020f89a2bfbfd6219f2c218163ea000c0cfdd3846f
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
if RUBY_VERSION < "2.0" Gretel::Renderer.class_eval do def options_for_render_with_show_root_alone(options = {}) options = options_for_render_without_show_root_alone(options) if show_root_alone = options.delete(:show_root_alone) Gretel.show_deprecation_warning "The :show_root_alone option is deprecated and will be removed in Gretel v4.0.0. Use `breadcrumbs(display_single_fragment: #{show_root_alone.inspect})` instead." options[:display_single_fragment] = show_root_alone end options end alias_method_chain :options_for_render, :show_root_alone end else module DeprecatedShowRootAlone def options_for_render(options = {}) options = super(options) if show_root_alone = options.delete(:show_root_alone) Gretel.show_deprecation_warning "The :show_root_alone option is deprecated and will be removed in Gretel v4.0.0. Use `breadcrumbs(display_single_fragment: #{show_root_alone.inspect})` instead." options[:display_single_fragment] = show_root_alone end options end end Gretel::Renderer.send :prepend, DeprecatedShowRootAlone end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
gretel-lite-3.0.10 | lib/gretel/deprecated/show_root_alone.rb |
gretel-3.0.9 | lib/gretel/deprecated/show_root_alone.rb |