method
new

Ruby on Rails latest stable (v5.2.3)
-
0 notes -
Class: ActionView::MissingTemplate
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1 (0)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (0)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (0)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- What's this?
new(paths, path, prefixes, partial, details, *)
public
Hide source
# File actionview/lib/action_view/template/error.rb, line 32 def initialize(paths, path, prefixes, partial, details, *) @path = path prefixes = Array(prefixes) template_type = if partial "partial" elsif /layouts/.match?(path) "layout" else "template" end if partial && path.present? path = path.sub(%{([^/]+)$}, "_\\1") end searched_paths = prefixes.map { |prefix| [prefix, path].join("/") } out = "Missing #{template_type} #{searched_paths.join(", ")} with #{details.inspect}. Searched in:\n" out += paths.compact.map { |p| " * #{p.to_s.inspect}\n" }.join super out end