I need to get a proxy class for a specific AR validation

I reuse a piece of code (from Globalize),  where it's set as a
constant :

module Globalize
  module Model
    module ActiveRecord
      class << self
        def create_proxy_class(klass)
          Object.const_set "#{klass.name}Translation", Class.new
(::ActiveRecord::Base){..}
..
end

so in my validation module, I can write :
translation_class = Globalize::Model::ActiveRecord.create_proxy_class
(self.class)
no problem when executing it...

but in my  model unit tests, I execute it many times, and I get the
warning...
warning: already initialized constant EnumerationTranslation    (when
my model class is Enumeration of course)

can I delete this constant in my test setup ?  how ?

thanks  fyh

erwin
--~--~---------~--~----~------------~-------~--~----~
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