diff options
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index a2f4ab2ef5..c6a17907ff 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -108,13 +108,9 @@ module ActionView query << '{' << ext.map {|e| e && ".#{e}" }.join(',') << '}' end - Dir[query].map do |path| - next if File.directory?(path) - source = File.read(path) - identifier = Pathname.new(path).expand_path.to_s - - Template.new(source, identifier, *path_to_details(path)) - end.compact + Dir[query].reject { |p| File.directory?(p) }.map do |p| + Template.new(File.read(p), File.expand_path(p), *path_to_details(p)) + end end # # TODO: fix me @@ -162,4 +158,4 @@ module ActionView @paths.first.to_s end end -end
\ No newline at end of file +end |