Adds fallbacks to the view paths. Useful in cases when you are rendering a
:file.
# File actionview/lib/action_view/lookup_context.rb, line 152
def with_fallbacks
view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)
if block_given?
ActiveSupport::Deprecation.warn <<~eowarn.squish
Calling `with_fallbacks` with a block is deprecated. Call methods on
the lookup context returned by `with_fallbacks` instead.
eowarn
begin
_view_paths = @view_paths
@view_paths = view_paths
yield
ensure
@view_paths = _view_paths
end
else
ActionView::LookupContext.new(view_paths, @details, @prefixes)
end
end