my bad. I moved that block to the bottom of the environment.rb file, 
after the "end" of the Rails::Initializer code, but got this error:

NoMethodError (undefined method 'validates_positivity_of' for 
#<Class...>)
   /../active_record/base.rb:1833:in 'method missing'

I tried loading this method though ./script/console:
irb> include CustomValidations
irb> validates_positivity_of 2
NoMethodError: undefined method 'validates_each' for #<object..>
   from /../lib/custom_validations.rb:6:in 'validates_positivity_of'

Now I'm not even sure if the function works properly.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to