mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use Kernel#Array instead of Array.wrap in view_paths
This commit is contained in:
parent
1a163dcc41
commit
ec28c4fb24
3 changed files with 3 additions and 4 deletions
|
@ -89,7 +89,7 @@ module AbstractController
|
|||
# * <tt>paths</tt> - If a PathSet is provided, use that;
|
||||
# otherwise, process the parameter into a PathSet.
|
||||
def view_paths=(paths)
|
||||
self._view_paths = ActionView::PathSet.new(Array.wrap(paths))
|
||||
self._view_paths = ActionView::PathSet.new(Array(paths))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'active_support/core_ext/module/attr_internal'
|
||||
require 'active_support/core_ext/module/delegation'
|
||||
require 'active_support/core_ext/class/attribute'
|
||||
require 'active_support/core_ext/array/wrap'
|
||||
require 'active_support/ordered_options'
|
||||
require 'action_view/log_subscriber'
|
||||
require 'active_support/core_ext/module/deprecation'
|
||||
|
@ -160,7 +159,7 @@ module ActionView #:nodoc:
|
|||
|
||||
def process_view_paths(value)
|
||||
value.is_a?(PathSet) ?
|
||||
value.dup : ActionView::PathSet.new(Array.wrap(value))
|
||||
value.dup : ActionView::PathSet.new(Array(value))
|
||||
end
|
||||
deprecate :process_view_paths
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ module ActionView
|
|||
# Whenever setting view paths, makes a copy so we can manipulate then in
|
||||
# instance objects as we wish.
|
||||
def view_paths=(paths)
|
||||
@view_paths = ActionView::PathSet.new(Array.wrap(paths))
|
||||
@view_paths = ActionView::PathSet.new(Array(paths))
|
||||
end
|
||||
|
||||
def find(name, prefixes = [], partial = false, keys = [], options = {})
|
||||
|
|
Loading…
Reference in a new issue