instance method
with_fallbacks
Ruby on Rails 6.1.7.10
Since v3.0.20 Last seen in v6.1.7.10Signature
with_fallbacks()
Adds fallbacks to the view paths. Useful in cases when you are rendering a :file.
Source
# File actionview/lib/action_view/lookup_context.rb, line 147
def with_fallbacks
view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)
if block_given?
raise ArgumentError, <<~eowarn.squish
Calling `with_fallbacks` with a block is not supported. Call methods on
the lookup context returned by `with_fallbacks` instead.
eowarn
else
ActionView::LookupContext.new(view_paths, @details, @prefixes)
end
end
Defined in actionview/lib/action_view/lookup_context.rb line 147
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::LookupContext::ViewPaths