redinger / validation_reflection

This plugin adds reflective access to validations
http://rubygems.org/gems/validation_reflection
MIT License
298 stars 18 forks source link

RAILS_ROOT not defined #1

Closed grimen closed 14 years ago

grimen commented 15 years ago

When running isolated tests on Rails plugin outside of a Rails project ValidationReflection fails because it can't find any constant definition for RAILS_ROOT. It's a good practice not to require such if it's not completely necessary - most cases not, and in this case it works fine just setting it to whatever to just sloppy-define it, or skip the expression if it's not defined.

redinger commented 14 years ago

Thanks for the commit! Merged.

halo commented 14 years ago

On Rails 3.0.0 beta2 I'm getting the following deprecation warning:

DEPRECATION WARNING: RAILS_ROOT is deprecated! Use Rails.root instead. (called from join at /Library/Ruby/Gems/1.8/gems/validation_reflection-0.3.6/lib/validation_reflection.rb:36)