diff options
author | Intrepidd <adrien@siami.fr> | 2013-03-20 18:24:48 +0000 |
---|---|---|
committer | Intrepidd <adrien@siami.fr> | 2013-03-20 18:24:48 +0000 |
commit | 9c025ab6e9731dde56186b41ba5d4f216a48c831 (patch) | |
tree | 166c33de21d106174afa8948d78b9e779b40b197 | |
parent | acb78c27e868d2b30d89fceb912b353169f1fd1d (diff) | |
download | rails-9c025ab6e9731dde56186b41ba5d4f216a48c831.tar.gz rails-9c025ab6e9731dde56186b41ba5d4f216a48c831.tar.bz2 rails-9c025ab6e9731dde56186b41ba5d4f216a48c831.zip |
Tidying up some require : removing useless sort and homogenizing with the rest of the code the wat the includes are done
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext.rb | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 72e3cf310a..714cc95b9a 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -376,7 +376,4 @@ module ActiveModel end end -Dir[File.dirname(__FILE__) + "/validations/*.rb"].sort.each do |path| - filename = File.basename(path) - require "active_model/validations/#{filename}" -end +Dir[File.dirname(__FILE__) + "/validations/*.rb"].each { |file| require file } diff --git a/activesupport/lib/active_support/core_ext.rb b/activesupport/lib/active_support/core_ext.rb index b48bdf08e8..998a59c618 100644 --- a/activesupport/lib/active_support/core_ext.rb +++ b/activesupport/lib/active_support/core_ext.rb @@ -1,4 +1,4 @@ -Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].sort.each do |path| +Dir["#{File.dirname(__FILE__)}/core_ext/*.rb"].each do |path| next if File.basename(path, '.rb') == 'logger' - require "active_support/core_ext/#{File.basename(path, '.rb')}" + require path end |