sa 125 wrote: > I saved it in lib/custom_validations.rb, and tried including it in the > top of my environment.rb to extend AR: > > include 'custom_validations' > class ActiveRecord::Base > include CustomValidations > end > > #.. rest of file > > Sadly, this won't work.
Always include even a snip of the error message you got. After your detailed writeup, just claiming "won't work" leaves us bereft of closure! However, the top of environment.rb might be before "require 'active_record'". That means 'class' would introduce 'ActiveRecord', leaving 'Base' as a missing identifier. If so, move it to the bottom! -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---