thedarkone
2012-Jul-03 20:51 UTC
Remove AV::Resolver/PathSet/LookupContext#find_all methods
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 rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
José Valim
2012-Jul-07 13:44 UTC
Remove AV::Resolver/PathSet/LookupContext#find_all methods
I believe Action Mailer uses all templates returned by find_all. I''m on iPhone so I am not sure, but it should be aroun the each_template method . -- 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/-/kNrT5hIwRM4J. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.