diff options
-rw-r--r-- | railties/lib/rails/paths.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 95229e35c1..f849d8bfc3 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -55,13 +55,13 @@ module Rails end def []=(path, value) - value = Path.new(self, path, value) unless value.is_a?(Path) + value = Path.new(self, path, [value].flatten) unless value.is_a?(Path) super(path, value) end def add(path, options={}) with = options[:with] || path - self[path] = Path.new(self, path, with, options) + self[path] = Path.new(self, path, [with].flatten, options) end def all_paths @@ -104,9 +104,8 @@ module Rails attr_reader :path attr_accessor :glob - def initialize(root, current, *paths) - options = paths.last.is_a?(::Hash) ? paths.pop : {} - super(paths.flatten) + def initialize(root, current, paths, options = {}) + super(paths) @current = current @root = root |