Permalink
Browse files

search in spec or test folder for valid_attributes.yml

  • Loading branch information...
1 parent cec7aa3 commit 07418dcda7e5ac3637e54ab87c73e0969635c079 @grosser committed Feb 26, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/valid_attributes.rb
View
@@ -56,6 +56,9 @@ def self.valid_attributes(record_name)
end
def self.path_to_valid_yml
- File.join(RAILS_ROOT,'test','valid_attributes.yml')
+ %w[test spec].each do |folder|
+ file = File.join(RAILS_ROOT,'test','valid_attributes.yml')
+ return file if File.exist?(file)
+ end
end
end

0 comments on commit 07418dc

Please sign in to comment.