Skip to content

Commit

Permalink
Now config file detection is much smarter; instead of looking in RAIL…
Browse files Browse the repository at this point in the history
…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
grimen committed Oct 2, 2009
1 parent 9143d96 commit 8292606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/validation_reflection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8292606

Please sign in to comment.