since I upgraded to 0.11.1 I get a string of "warning: already
initialized constant" errors in my error log. I couldn''t figure it
out. I created a blank rails project to test it.
two models :
account belongs_to :user
user has_many :accounts
in the accounts model, I set the following constants
CLOSED = 0
INACTIVE = 1
ACTIVE = 2
then I set up a test controller with a simple index method:
def index
render_text Account::INACTIVE
end
when I go to /test/index the expected text gets rendered, but in the
error log I get the following:
[Fri Apr 01 09:10:55 2005] [error] [client 127.0.0.1] FastCGI: server
"C:/XXX/dispatch.fcgi" stderr:
C:/XXX/public/../config/..//app/models/account.rb:4: warning: already
initialized constant CLOSED
the error is repeated for INACTIVE and ACTIVE
if I remove the belongs_to: user association from the account model i
don''t get the errors, so either I''m doing something wrong
(most
likely) or it''s a bug...
any suggestions?
alan