There is not a single line of code in all of Rails that makes use of the `.find_all` template API, that doesn't look like this: `lookup.find_all(*args).first`. Getting rid of the unnecessary Array handling would simplify the implementation.
Therefore I would like to propose to deprecate and remove the `AV::Resolver#find_all/find_templates`, `AV::PathSet#find_all` and `LookupContext#find_all` methods and replace them with `AV::Resolver#find/find_template`, `AV::PathSet#find/find_if_exists` and `LookupContext#find/find_if_exists`. Some of the classes already provide the `#find` methods so that would be mostly about replacing `lookup.find_all(*args).first` with `lookup.find_if_exists(*args)`. Would be willing to provide a patch. /cc @josevalim. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/DuGdkKiGoDkJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
