Permalink
Browse files

Now config file detection is much smarter; instead of looking in RAIL…

…S_ROOT/config/plugins only (non-conventional anyway), now searches for first file matching RAILS_ROOT/config/**/validation_reflection.rb. Also, isolated testing issues caused by undefined RAILS_ROOT error, should not be an issue anymore.
  • Loading branch information...
1 parent 9143d96 commit 8292606dc94c974922ba188981b57abffdb2f228 @grimen grimen committed Oct 2, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/validation_reflection.rb
@@ -31,7 +31,7 @@ module ValidationReflection # :nodoc:
extend self
- CONFIG_PATH = ::File.join(RAILS_ROOT, 'config', 'plugins', 'validation_reflection.rb')
+ CONFIG_PATH = ::Dir.glob((::File.join(RAILS_ROOT, 'config', '**', 'validation_reflection.rb').to_s rescue '')).first || ''
@@reflected_validations = [
:validates_acceptance_of,

0 comments on commit 8292606

Please sign in to comment.