mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Just remove the sort_locals method
This commit is contained in:
parent
1fbc4704df
commit
14a8fd146a
1 changed files with 1 additions and 12 deletions
|
@ -69,7 +69,7 @@ module ActionView
|
|||
# before returning it.
|
||||
def cached(key, path_info, details, locals) #:nodoc:
|
||||
name, prefix, partial = path_info
|
||||
locals = sort_locals(locals)
|
||||
locals = locals.map { |x| x.to_s }.sort!
|
||||
|
||||
if key && caching?
|
||||
@cached[key][name][prefix][partial][locals] ||= decorate(yield, path_info, details, locals)
|
||||
|
@ -98,17 +98,6 @@ module ActionView
|
|||
t.virtual_path ||= (cached ||= build_path(*path_info))
|
||||
end
|
||||
end
|
||||
|
||||
if :symbol.respond_to?("<=>")
|
||||
def sort_locals(locals) #:nodoc:
|
||||
locals.sort
|
||||
end
|
||||
else
|
||||
def sort_locals(locals) #:nodoc:
|
||||
locals = locals.map{ |l| l.to_s }
|
||||
locals.sort!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# An abstract class that implements a Resolver with path semantics.
|
||||
|
|
Loading…
Reference in a new issue