Skip to content
Browse files

Revert "Respect children paths filter settings"

This reverts commit 53778ec.
Closes #8146
  • Loading branch information...
1 parent e41d78c commit fc5ccd2c0b10533a5101bf247023246f6148d723 @spastorino spastorino committed Nov 9, 2012
Showing with 6 additions and 13 deletions.
  1. +0 −2 railties/CHANGELOG.md
  2. +6 −11 railties/lib/rails/paths.rb
View
2 railties/CHANGELOG.md
@@ -1,7 +1,5 @@
## Rails 3.2.9 (unreleased)
-* Don't eager-load app/assets and app/views *Elia Schito*
-
* Update supported ruby versions error message in ruby_version_check.rb *Lihan Li*
## Rails 3.2.8 (Aug 9, 2012) ##
View
17 railties/lib/rails/paths.rb
@@ -87,15 +87,14 @@ def load_paths
protected
def filter_by(constraint)
- yes = []
- no = []
-
+ all = []
all_paths.each do |path|
- paths = path.existent + path.existent_base_paths
- path.send(constraint) ? yes.concat(paths) : no.concat(paths)
+ if path.send(constraint)
+ paths = path.existent
+ paths -= path.children.map { |p| p.send(constraint) ? [] : p.existent }.flatten
+ all.concat(paths)
+ end
end
-
- all = yes - no
all.uniq!
all
end
@@ -195,10 +194,6 @@ def existent_directories
expanded.select { |d| File.directory?(d) }
end
- def existent_base_paths
- map { |p| File.expand_path(p, @root.path) }.select{ |f| File.exist? f }
- end
-
alias to_a expanded
private

0 comments on commit fc5ccd2

Please sign in to comment.
Something went wrong with that request. Please try again.